There is already a TODO list
Didn't know that, thanks! However, the only TODO I found related to sysusers was this one, and privoxy seems to be marked as "complete" there...
Yes, but I was talking in general... the discussion shifted from a pacman package (see thread title) to the privoxy package...
Ah yes, makes sense then.
]]>a821 wrote:The install file in a pkg.tar.xz file is called .INSTALL, these files are stored in the pacman's database in /var/lib/pacman (there they're called simply "install"). I don't see why it wouldn't work.
The problem here is that the .INSTALL file is not there.
Yes, but I was talking in general... the discussion shifted from a pacman package (see thread title) to the privoxy package...
]]>ayekat wrote:So the packaging bug is that the .install file is no longer needed (and only causes confusion).
yep , I'm the guy being confused this time
You could file a bug report to avoid further people from getting confused
]]>Ah, I just took a look at the hooks directory (/usr/share/libalpm/hooks), and I saw that there is a systemd-sysusers.hook that runs `systemd-sysusers` everytime something happens in /usr/lib/sysusers.d. So indeed, the .install file is not needed anymore. I learned something new today
So the packaging bug is that the .install file is no longer needed (and only causes confusion).
yep , I'm the guy being confused this time
]]>So the packaging bug is that the .install file is no longer needed (and only causes confusion).
]]>The "other way" is actually installing a configuration file for sysusers.d, so that systemd creates the user during boot time. But to create the user the moment the package is installed (rather than having to reboot the machine or running `systemd-sysusers` manually), the .install file is needed.
So the .install file is not useless - not including it properly to the package is a bug, IMHO (although not very severe).
when I was experimenting with it, I removed the package, deleted the user, confirmed the user is deleted by looking at the /etc/passwd file, cleared the cache, delete all remaining files in the cache directory, without reboot, I reinstalled privoxy with 'pacman -S'. without reboot , I looked the /etc/passwd file, the 'privoxy' user appeared again in the /etc/passwd file.
I'm not familiar systemd yet so I don't have the knowledge for further discussion on this topic with you. I will learn it later, but I post the experiment above here maybe it will be useful to you since it created the user without reboot
]]>socialloser1 wrote:a821 wrote:To add, the install files (if any) are stored in pacman's database (or look at the package sources in the git web interface).
I don't understand, if a package install script it is stored in the database, if you copy pkg.tar.xz file to other machine, and use pacman -U to install it , it will not work correctly, right ?
The install file in a pkg.tar.xz file is called .INSTALL, these files are stored in the pacman's database in /var/lib/pacman (there they're called simply "install"). I don't see why it wouldn't work.
I understand how it works now. I see those files in /var/lib/pacman too. thank you for the reply.
]]>you're right. after some investigate , I get it now. there is a .install file in the directory to create a user to run service, but it is not used in the PKGBUILD. but it still created the user with the final package. so the author must changed to another way to do this, leaving the useless .install file there. this post is solved.
The "other way" is actually installing a configuration file for sysusers.d, so that systemd creates the user during boot time. But to create the user the moment the package is installed (rather than having to reboot the machine or running `systemd-sysusers` manually), the .install file is needed.
So the .install file is not useless - not including it properly to the package is a bug, IMHO (although not very severe).
The install file in a pkg.tar.xz file is called .INSTALL, these files are stored in the pacman's database in /var/lib/pacman (there they're called simply "install"). I don't see why it wouldn't work.
The problem here is that the .INSTALL file is not there.
]]>a821 wrote:To add, the install files (if any) are stored in pacman's database (or look at the package sources in the git web interface).
I don't understand, if a package install script it is stored in the database, if you copy pkg.tar.xz file to other machine, and use pacman -U to install it , it will not work correctly, right ?
The install file in a pkg.tar.xz file is called .INSTALL, these files are stored in the pacman's database in /var/lib/pacman (there they're called simply "install"). I don't see why it wouldn't work.
]]>To have the .install file included in the package, it should be stated in the PKGBUILD (see https://wiki.archlinux.org/index.php/PKGBUILD#install).
The privoxy package does not appear to do that, so there is not .INSTALL file in the resulting package. I'm not sure why, though - to me, this looks like a packaging bug: either it should be included, or the (unused) .install file should be removed.
... or I'm missing something about packaging with makepkg.
you're right. after some investigate , I get it now. there is a .install file in the directory to create a user to run service, but it is not used in the PKGBUILD. but it still created the user with the final package. so the author must changed to another way to do this, leaving the useless .install file there. this post is solved.
]]>The privoxy package does not appear to do that, so there is not .INSTALL file in the resulting package. I'm not sure why, though - to me, this looks like a packaging bug: either it should be included, or the (unused) .install file should be removed.
... or I'm missing something about packaging with makepkg.
]]>It's called '.INSTALL' on the top-level dir. Of course you won't see it unless you enable showing hidden files
I know how to view hidden files , but there is only 3 hidden file in the privoxy package:
.BUILDINFO
.MTREE
.PKGINFO
while in the ABS source it certainly contains an install script.
maybe I should see more packages first, I will do some experiment and will reply later.
To add, the install files (if any) are stored in pacman's database (or look at the package sources in the git web interface).
I don't understand, if a package install script it is stored in the database, if you copy pkg.tar.xz file to other machine, and use pacman -U to install it , it will not work correctly, right ?
]]>