LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-24-2018, 10:17 AM   #1921
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619

Quote:
Originally Posted by chrisretusn View Post
Well I can certainly understand that. I think we are taking the simple of of KIS. I'm always for less work. Maintaining -current takes some work. I'm fine with that. Looking at ntp.conf as the example. You change two lines from the default, the new ntp.conf is unchanged except for those two lines. I can see that. How you going to tell the installer yours is the same except for those two lines?

What about may use case? My ntp.conf has 4 parts, 9 lines in all that have changed from the default. Some configurations files are a nightmare (cups.conf) for example. I gotten to the point of selecting keep (cups.conf.new) then deleting it after processing via slackpkg is finished so it won't come up again because I know there are no changes affecting my setup.
I don't really see how it's any different. With my proposed changes, you would not get a .new file at all unless it was different from the previous default config file. This would be even more helpful for large complicated files where you've made lots of edits, because you wouldn't need to dig through it to find out whether there were important changes. No .new file = the only changes are the ones you made yourself. If there is a .new file, that means there are potentially important changes coming from the new package.

Last edited by montagdude; 08-24-2018 at 10:26 AM.
 
1 members found this post helpful.
Old 08-24-2018, 12:37 PM   #1922
cgorac
Member
 
Registered: Oct 2009
Posts: 146

Rep: Reputation: 87
Quote:
Originally Posted by montagdude View Post
With my proposed changes, you would not get a .new file at all unless it was different from the previous default config file.
Your proposal, maybe with using hashes as mentioned by others, seems to me like an excellent idea.
 
1 members found this post helpful.
Old 08-24-2018, 12:41 PM   #1923
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 195

Rep: Reputation: Disabled
Mesa 18.1.7
ftp://ftp.freedesktop.org/pub/mesa/mesa-18.1.7.tar.xz
ftp://ftp.freedesktop.org/pub/mesa/m...1.7.tar.xz.sig
The list of Mesa 18.1.7 fixes can be found via the 18.1 Git branch.
 
1 members found this post helpful.
Old 08-25-2018, 04:08 AM   #1924
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
Quote:
Quote:
Originally Posted by montagdude View Post
With my proposed changes, you would not get a .new file at all unless it was different from the previous default config file.
Your proposal, maybe with using hashes as mentioned by others, seems to me like an excellent idea.
You may get issue where the default config file does not change, but the compiled in options or functionality does change, requiring you to change the config for things to work the same. eg. with samba, wget etc. where the project's own documentation and sample configs have not kept up with their changes in functionality in the code, or the maintainer has changed compile options.
The changes may be documented in the changelogs, but not the example configs
there is no way to handle this without the maintainer (Pat or an sbo package maintainer) changing the example config making it different to upstream to force a checksum change. You would still need to read the changelog to find out what you needed to do different in your own config to achieve the same effect.
 
Old 08-25-2018, 11:33 AM   #1925
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
Quote:
Originally Posted by timsoft View Post
You may get issue where the default config file does not change, but the compiled in options or functionality does change, requiring you to change the config for things to work the same. eg. with samba, wget etc. where the project's own documentation and sample configs have not kept up with their changes in functionality in the code, or the maintainer has changed compile options.
The changes may be documented in the changelogs, but not the example configs
there is no way to handle this without the maintainer (Pat or an sbo package maintainer) changing the example config making it different to upstream to force a checksum change. You would still need to read the changelog to find out what you needed to do different in your own config to achieve the same effect.
How is that different from the present situation? Even now, if upstream did not put the relevant changes in the default config file, you would still need to read the changelog to find them. The .new file installed on your system would not have them unless the maintainer (Pat, SBo, etc.) added them in.

Last edited by montagdude; 08-25-2018 at 11:51 AM.
 
Old 08-25-2018, 12:09 PM   #1926
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
I will use ntp as an example, since it was recently upgraded in 14.2. On my system, I had uncommented a few lines in /etc/ntp.conf. When ntp was upgraded, /etc/ntp.conf.new was installed, which only differed from /etc/ntp.conf by having those lines commented again. In other words, /etc/ntp.conf.new was offering to revert the changes I had made. My request is to prevent this from happening. In other words, if ntp.conf in the ntp-4.2.8p12 package is not any different from the one in the previous version, then I would like it to not be installed as ntp.conf.new, because it is in fact not new.
This is an example where the 'vimdiff' option to slackpkg, which has been in -current since Thu May 31 04:55:33 UTC 2018, is useful. The incoming .new file can be compared to the existing .conf file and patched as required before using the slackpkg 'o' (overwrite) option.
 
3 members found this post helpful.
Old 08-25-2018, 04:19 PM   #1927
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Seems like the packager (Patrick) could append an md5 digest of the .config file to itself (at time of packaging, not at install time), then when deciding whether to write a .new the two digests could be "tail -1"'d out and compared, easy-peasy and no extraneous files littering /etc.

That would detect whether the original .config was the same as the new .config, regardless of whether the original had been modified since then (since the modifications would not be reflected in the digest).

The relevant cases and the resulting behavior would then be:

1) Old config, unmodified + new config same as the old one --> no .new written

2) Old config, unmodified + new config different than the old --> writes .new

3) Old config, modified + new config same as the old one --> no .new written

4) Old config, modified + new config different than the old --> writes .new

The only difference between this and the current behavior would be case 3.

Is this the desired behavior, or did I misunderstand?

Last edited by ttk; 08-25-2018 at 04:20 PM.
 
3 members found this post helpful.
Old 08-25-2018, 04:44 PM   #1928
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
To be honest, I see only one thing to improve on config files management:

Let's use as example the "/etc/drirc" which differs often depending on Mesa package version.

It is pretty possible that the new config file to differ by the old one, yet the old one to be unmodified by user - let's say "the original" and that new config file will be saved as "/etc/drirc.new", with the need of user intervention for overriding.

My idea is that IF the old config file is "the original" - aka the user does not modified it, it still to be replaced by the new one, even if their contents differ.

And that could be handled by using checksums appended to the config files, like @TTK suggested.

This behavior will simplify the flow of upgrading packages, in my humble opinion.

PS. I guess that there's also the alternative to store the config checksums in a GDBM database (which is just a file) interrogated by the scripts via gdbmtool

BTW, the GDBM databases stores (only) pairs of key/value, they not being "relational", like for example SQLite or MySQL.

Last edited by Darth Vader; 08-25-2018 at 06:43 PM.
 
2 members found this post helpful.
Old 08-25-2018, 06:51 PM   #1929
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
Quote:
Originally Posted by ttk View Post
Seems like the packager (Patrick) could append an md5 digest of the .config file to itself (at time of packaging, not at install time), then when deciding whether to write a .new the two digests could be "tail -1"'d out and compared, easy-peasy and no extraneous files littering /etc.

That would detect whether the original .config was the same as the new .config, regardless of whether the original had been modified since then (since the modifications would not be reflected in the digest).

The relevant cases and the resulting behavior would then be:

1) Old config, unmodified + new config same as the old one --> no .new written

2) Old config, unmodified + new config different than the old --> writes .new

3) Old config, modified + new config same as the old one --> no .new written

4) Old config, modified + new config different than the old --> writes .new

The only difference between this and the current behavior would be case 3.

Is this the desired behavior, or did I misunderstand?
Yes, I believe you have understood my proposal well. Case 3) is the one I was targeting with my mods in post 1906. Your solution is cleaner, in that it avoids having .ref files around all over the place, but it requires a lot more manual work for the packager. My solution requires only a one-time change to the config() function in doinst.sh and a small change in upgradepkg and installpkg. Personally, I don't mind having .ref files around, because they make it easy to see what you changed, and their disk usage would be completely negligible.

I'm actually considering making this modification to my system if Patrick doesn't accept it. All that will be needed in addition to what I already posted in #1906 is to modify slackpkg to automatically replace the config() function in any doinst.sh files before installing.

Last edited by montagdude; 08-25-2018 at 06:56 PM.
 
Old 08-25-2018, 06:59 PM   #1930
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
I like the idea of using md5sums of config files for the proposal montagdude mentions, because I like it easy when updating files (such a system would have to be able to handle multiple config files per project/program).

The only downside from a user point of view is that it allows me to be lasy. Maybe I should spend more time checking out changelogs when packages get updated ,and not having the convenience this may provide forces me to check my config files better. I may not like it, but the current system may force me to maintain my current knowledge of the packages I have configured.
 
2 members found this post helpful.
Old 08-25-2018, 07:03 PM   #1931
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
Quote:
Originally Posted by timsoft View Post
The only downside from a user point of view is that it allows me to be lasy. Maybe I should spend more time checking out changelogs when packages get updated ,and not having the convenience this may provide forces me to check my config files better. I may not like it, but the current system may force me to maintain my current knowledge of the packages I have configured.
That is a fair point.
 
1 members found this post helpful.
Old 08-25-2018, 07:07 PM   #1932
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
meson-0.47.2
https://github.com/mesonbuild/meson/.../0.47.2.tar.gz

ethtool-4.18
https://mirrors.edge.kernel.org/pub/...ol-4.18.tar.xz

Last edited by USUARIONUEVO; 08-25-2018 at 07:09 PM.
 
Old 08-25-2018, 07:25 PM   #1933
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Cool .. I'm thinking of doing something similar for my own process. I'm really glad you suggested this.

If anyone's interested, here's a script which appends md5 digests to files (removing the old one first, if any):

http://ciar.org/h/md5stamp

The only external dependency is File::Valet, which can be installed from CPAN. (It also uses Digest::MD5, but that's already shipped with perl on Slackware, so no need to go get it.)

File::Valet can be easily replaced with File::Slurper (which is more standard) or with perl's builtin open/read/write/close. If that's a change anyone wants, please let me know and I'll provide it. I know some people dislike external dependencies of any kind.
 
4 members found this post helpful.
Old 08-25-2018, 10:53 PM   #1934
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
python-certifi-2018.8.24
https://files.pythonhosted.org/packa...18.8.24.tar.gz

python-idna-2.7
https://files.pythonhosted.org/packa...dna-2.7.tar.gz

python-packaging-17.1
https://files.pythonhosted.org/packa...ng-17.1.tar.gz

python-pillow-5.2.0
https://files.pythonhosted.org/packa...w-5.2.0.tar.gz

python-requests-2.19.1
https://files.pythonhosted.org/packa...-2.19.1.tar.gz

python-urllib3-1.23
https://files.pythonhosted.org/packa...b3-1.23.tar.gz

python-setuptools-40.2.0
https://files.pythonhosted.org/packa...ols-40.2.0.zip

Last edited by USUARIONUEVO; 08-25-2018 at 11:01 PM.
 
1 members found this post helpful.
Old 08-26-2018, 12:51 AM   #1935
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 195

Rep: Reputation: Disabled
Samba 4.8.5
https://www.samba.org/samba/history/samba-4.8.5.html
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Requests for -current (20151216) rworkman Slackware 3441 12-28-2017 03:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration