You are not logged in.
Per the wiki page referenced below, I believe that pacman should auto-detect a diff in a config file on the filesystem vs. the one it will install with the friendly "warning: /foo/bar installed as /foo/bar.pacnew" to /foo/bar.pacnew but I am not seeing that message. I am seeing the pacnew file. What am I doing wrong in my PKGBUILD?
Link to PKGBUILD in question.
ref: https://wiki.archlinux.org/index.php/Pa … save_Files
EDIT: I think this is due to the fast that the Makefile is installing /etc/psd.conf and not pacman....
EDIT2: No, this is not the case... when I change the package function in the PKGBUILD to the following, pacman still does not warn of the difference... why?
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# allow pacman to track /etc/psd.conf to inform users of changes
rm -f "$pkgdir/etc/psd.conf"
install -Dm644 common/psd.conf "$pkgdir/etc/psd.conf"
}Last edited by graysky (2013-02-22 20:57:00)
Offline
Are you sure the pacnew is not from a previous update?
Offline
I have none on the filesystem before or after I build a new version; here I bumped the pkgver from 2 to 3 just on my machine to demonstrate:
% ls -l /etc/psd.conf*
-rw-r--r-- 1 root root 1324 Feb 13 17:36 /etc/psd.conf
% makepkg -srci
==> Making package: profile-sync-daemon 5.26-3 (Fri Feb 22 14:45:47 EST 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Found profile-sync-daemon-5.26.tar.xz
==> Validating source files with sha256sums...
profile-sync-daemon-5.26.tar.xz ... Passed
==> Extracting Sources...
-> Extracting profile-sync-daemon-5.26.tar.xz with bsdtar
==> Starting build()...
Setting version
==> Entering fakeroot environment...
==> Starting package()...
Installing manpage...
Installing main script, initd and config...
install -Dm644 doc/psd.1 "/scratch/profile-sync-daemon/pkg/usr/share/man/man1/psd.1"
Installing cronjob...
install -Dm644 common/psd.conf "/scratch/profile-sync-daemon/pkg/etc/psd.conf"
install -Dm755 common/psd.cron.hourly "/scratch/profile-sync-daemon/pkg/etc/cron.hourly/psd-update"
install -Dm644 init/psd.service "/scratch/profile-sync-daemon/pkg/usr/lib/systemd/system/psd.service"
gzip -9 "/scratch/profile-sync-daemon/pkg/usr/share/man/man1/psd.1"
install -Dm755 common/profile-sync-daemon "/scratch/profile-sync-daemon/pkg/usr/bin/profile-sync-daemon"
ln -s psd.1.gz "/scratch/profile-sync-daemon/pkg/usr/share/man/man1/profile-sync-daemon.1.gz"
ln -s profile-sync-daemon "/scratch/profile-sync-daemon/pkg/usr/bin/psd"
==> Tidying install...
-> Purging unwanted files...
-> Compressing man and info pages...
-> Stripping unneeded symbols from binaries and libraries...
==> Creating package...
-> Generating .PKGINFO file...
-> Adding install file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: profile-sync-daemon 5.26-3 (Fri Feb 22 14:45:48 EST 2013)
==> Installing package profile-sync-daemon with pacman -U...
loading packages...
resolving dependencies...
looking for inter-conflicts...
Targets (1): profile-sync-daemon-5.26-3
Total Installed Size: 0.04 MiB
Net Upgrade Size: 0.00 MiB
Proceed with installation? [Y/n]
(1/1) checking package integrity [############################################] 100%
(1/1) loading package files [############################################] 100%
(1/1) checking for file conflicts [############################################] 100%
(1/1) upgrading profile-sync-daemon [############################################] 100%
==> Cleaning up...
% ls -l /etc/psd.conf*
-rw-r--r-- 1 root root 1324 Feb 13 17:36 /etc/psd.confNo pacnew warning!
Last edited by graysky (2013-02-22 19:46:53)
Offline
No pacnew warning because no pacnew file created...
Offline
@scimmia - Right... my understanding is that pacman does this based on my PKGBUILD's backup= array. I don't understand why that isn't happening. Thanks.
Offline
Are you sure that psd.conf has actually been modified since the last update?
EDIT: I think this is due to the fast that the Makefile is installing /etc/psd.conf and not pacman....
EDIT2: No, this is not the case... when I change the package function in the PKGBUILD to the following, pacman still does not warn of the difference... why?package() { ... # allow pacman to track /etc/psd.conf to inform users of changes rm -f "$pkgdir/etc/psd.conf" install -Dm644 common/psd.conf "$pkgdir/etc/psd.conf" }
Just FYI, pacman is what installs the files to the system. It's irrelevant if the intermediate "$pkgdir/etc/psd.conf" was put there by `make' or `install' (in fact the makefile probably uses `install' internally anyway).
Offline
Sounds like you might wanna read "HANDLING CONFIG FILES" in pacman's man page.
HEADSMACK! I am forcing situation "original=X, current=Y, new=X" -- if I modify the source common/psd.conf I get the expected result. Thank you; solved... and I was right! PEBKAC!
==> Leaving fakeroot environment.
==> Finished making: profile-sync-daemon 5.26-4 (Fri Feb 22 15:55:37 EST 2013)
==> Installing package profile-sync-daemon with pacman -U...
loading packages...
warning: profile-sync-daemon-5.26-4 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Targets (1): profile-sync-daemon-5.26-4
Total Installed Size: 0.04 MiB
Net Upgrade Size: 0.00 MiB
Proceed with installation? [Y/n]
(1/1) checking package integrity [############################################] 100%
(1/1) loading package files [############################################] 100%
(1/1) checking for file conflicts [############################################] 100%
(1/1) upgrading profile-sync-daemon [############################################] 100%
warning: /etc/psd.conf installed as /etc/psd.conf.pacnewLast edited by graysky (2013-02-22 20:56:42)
Offline