Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586274 - sys-apps/portage: FEATURES=config-protect-if-modified interacts with quickpkg --include-config=y
Summary: sys-apps/portage: FEATURES=config-protect-if-modified interacts with quickpkg...
Status: RESOLVED DUPLICATE of bug 464662
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-18 09:19 UTC by Agostino Sarubbo
Modified: 2017-10-14 20:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2016-06-18 09:19:41 UTC
I have the following problem, and I hope this is not the expected behavior.

I have 2 machines:
1)binhost: where I compile the packages.
2)woe-olg: where I will install packages compiled on binhost.

# I'M EDITING SYSLOG-NG.CONF AND GENERATE A NEW BINPKG
binhost ~ # echo "foo" > /etc/syslog-ng/syslog-ng.conf && quickpkg --include-config y syslog-ng
 * Building package for app-admin/syslog-ng-3.7.3 ...                                                                                                                                                                                                                   [ ok ]

 * Packages now in '/usr/portage/packages':
 * app-admin/syslog-ng-3.7.3: 649K
binhost ~ # cat /etc/syslog-ng/syslog-ng.conf 
foo


# FROM THE SECOND MACHINE, I COMPLETELY DELETED SYSLOG-NG.CONF AND I'M EMERGING THE PACKAGE
woe-olg ~ # rm /etc/syslog-ng/syslog-ng.conf ; emerge -q1O syslog-ng ; cat /etc/syslog-ng/syslog-ng.conf 
>>> Emerging binary (1 of 1) app-admin/syslog-ng-3.7.3::gentoo
>>> Installing (1 of 1) app-admin/syslog-ng-3.7.3::gentoo

 * IMPORTANT: config file '/etc/syslog-ng/syslog-ng.conf' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
cat: /etc/syslog-ng/syslog-ng.conf: No such file or directory

That's fine, I need to call dispatch-conf. Ok I'm doing it.
woe-olg ~ # dispatch-conf 
--- /tmp/tmpWDYgiY/0    2016-06-18 11:11:41.129962788 +0200
+++ /etc/syslog-ng/._cfg0000_syslog-ng.conf     2016-06-18 11:09:49.600000000 +0200
@@ -1 +1 @@
-/dev/null
+foo

>> (1 of 1) -- /etc/syslog-ng/syslog-ng.conf
>> q quit, h help, n next, e edit-new, z zap-new, u use-new
   m merge, t toggle-merge, l look-merge:  
woe-olg ~ # cat /etc/syslog-ng/syslog-ng.conf 
foo


Now I'm using the config proposed by the package. Let's change the config on the binhost.
binhost ~ # echo "bar" > /etc/syslog-ng/syslog-ng.conf && quickpkg --include-config y syslog-ng
 * Building package for app-admin/syslog-ng-3.7.3 ...                                                                                                                                                                                                                   [ ok ]

 * Packages now in '/usr/portage/packages':
 * app-admin/syslog-ng-3.7.3: 649K
binhost ~ # cat /etc/syslog-ng/syslog-ng.conf 
bar

The binhost machine is proposing bar in the syslog.ng.conf.


Now on the client machine, let's print syslog-ng.conf, re-emerge the package and then cat again the conf.

woe-olg ~ # cat /etc/syslog-ng/syslog-ng.conf ; emerge -q1O syslog-ng ; cat /etc/syslog-ng/syslog-ng.conf 
foo
>>> Emerging binary (1 of 1) app-admin/syslog-ng-3.7.3::gentoo
>>> Installing (1 of 1) app-admin/syslog-ng-3.7.3::gentoo
bar
woe-olg ~ #


THIS HAS BEEN CHANGED FROM FOO TO BAR WITHOUT NOTICE.
Comment 1 Zac Medico gentoo-dev 2016-06-20 07:29:31 UTC
This is a result of FEATURES=config-protect-if-modified, combined with quickpkg --include-config=y. Using quickpkg like that makes it look like the /etc/syslog-ng/syslog-ng.conf containing "foo" was unmodified, allowing it to be replaced by the "new" config containing "bar".
Comment 2 Zac Medico gentoo-dev 2016-06-20 07:36:23 UTC
Maybe we should just add some warnings to the relevant documentation sections, explaining how these things can interact.
Comment 3 Zac Medico gentoo-dev 2017-10-14 20:00:44 UTC

*** This bug has been marked as a duplicate of bug 464662 ***