zypper: does it rename original config files to extensions .original~ ?

After the last big Tumbleweed update ssh didn’t work correctly (already a thread), but also Apache2 was having problems.

It tried to load the (now non-existing) php5 module from /etc/apache2/sysconfig.d/loadmodule.conf.original~.

I never created that config file, so I was wondering: does zypper do that?

**revue:/etc/apache2/sysconfig.d #** rcapache2 status**●** apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; vendor preset: disabled)
   Active: **failed** (Result: exit-code) since Mon 2016-05-02 19:39:26 CEST; 20h ago
 Main PID: 2839 (code=exited, status=1/FAILURE)


May 02 19:39:26 revue start_apache2[2869]: [Mon May 02 19:39:26.901071 2016] [so:warn] [pid 2869] AH01574: module negotiation_module is already loaded, skipping
May 02 19:39:26 revue start_apache2[2869]: [Mon May 02 19:39:26.901080 2016] [so:warn] [pid 2869] AH01574: module setenvif_module is already loaded, skipping
May 02 19:39:26 revue start_apache2[2869]: [Mon May 02 19:39:26.901096 2016] [so:warn] [pid 2869] AH01574: module ssl_module is already loaded, skipping
May 02 19:39:26 revue start_apache2[2869]: [Mon May 02 19:39:26.901105 2016] [so:warn] [pid 2869] AH01574: module socache_shmcb_module is already loaded, skipping
May 02 19:39:26 revue start_apache2[2869]: [Mon May 02 19:39:26.901117 2016] [so:warn] [pid 2869] AH01574: module userdir_module is already loaded, skipping
May 02 19:39:26 revue start_apache2[2869]: httpd-prefork: Syntax error in -C/-c directive: Syntax error on line 29 of /etc/apache2/sysconfig.d/loadmodule.conf.original~: Cannot load /usr/lib64/apache2/mod_php5.so into server: /usr/lib64/apache2/mod_php5.so: cannot open shared object file: No such file or directory
May 02 19:39:26 revue systemd[1]: **apache2.service: Control process exited, code=exited status=1**
May 02 19:39:26 revue systemd[1]: **Failed to start The Apache Webserver.**
May 02 19:39:26 revue systemd[1]: **apache2.service: Unit entered failed state.**
May 02 19:39:26 revue systemd[1]: **apache2.service: Failed with result 'exit-code'.**
**revue:/etc/apache2/sysconfig.d #** ls -al
total 16
drwxr-xr-x 1 root root  126 Jul 12  2015 **.**
drwxr-xr-x 1 root root 1030 Apr 28 21:27 **..**
-rw-r--r-- 1 root root  239 May  2 19:39 global.conf
-rw-r--r-- 1 root root   92 May  2 19:39 include.conf
-rw-r--r-- 1 root root 2044 May  2 19:39 loadmodule.conf
-rw-r--r-- 1 root root 2196 Jun  9  2015 loadmodule.conf.original~
**revue:/etc/apache2/sysconfig.d #** !d
diff -w loadmodule.conf loadmodule.conf.original~ 
1c1,7
< # File generated from /etc/sysconfig/apache2, do not edit. Edit the sysconfig file instead.
---
> #
> # Files in this directory are created at apache start time by /usr/sbin/rcapache2 
> # Do not edit them!
> #
> 
> # as listed in APACHE_MODULES (/etc/sysconfig/apache2)
> 
22a29
> LoadModule php5_module                    /usr/lib64/apache2/mod_php5.so
25,29c32,33
< LoadModule proxy_module /usr/lib64/apache2-prefork/mod_proxy.so
< LoadModule proxy_http_module /usr/lib64/apache2-prefork/mod_proxy_http.so
< LoadModule proxy_connect_module /usr/lib64/apache2-prefork/mod_proxy_connect.so
< LoadModule rewrite_module /usr/lib64/apache2-prefork/mod_rewrite.so
< LoadModule php7_module /usr/lib64/apache2/mod_php7.so
---
> #
> 
**revue:/etc/apache2/sysconfig.d #** ls -al load*
-rw-r--r-- 1 root root 2044 May  2 19:39 loadmodule.conf
-rw-r--r-- 1 root root 2196 Jun  9  2015 loadmodule.conf.original~
**revue:/etc/apache2/sysconfig.d #** 

No.

zypper does not modify anything in the system itself, it actually just calls rpm for the actual work.

rpm does such things under certain circumstances, but it doesn’t use the extension .original~ either. (if it is about to replace a modified config file it either saves the new copy as xxx.rpmnew, or renames the old one to xxx.rpmsave)

But when updating, rpm doesn’t replace the files directly, it first installs the new ones under a different name, and then renames them after deleting the old ones (to prevent partial updates).
As your update was interrupted at some intermediate point, there might be some left-overs… (though I’m not sure they would be called xxx.original~)

On my 13.2 system, /etc/apache2/sysconfig.d/loadmodule.conf is not owned by any package though, so neither rpm nor zypper should care about it in any way.
The file might get created by some package’s custom postinstall script though, and this might have created the backup (and maybe got aborted before deleting it)…

My understanding (which could be wrong), is that zypper just installs and deletes packages and evaluates dependency issues.

After a package is installed or removed, that package might designate a script to be run. And zypper will run that script. But what the script does is under control of the package (and the package maintainers).

If a package install is renaming a file, then it’s likely due to something in the package, not to zypper.

Thanks. It wasn’t etckeeper either (but the .original~ file was identical to the one in the git repository). I will keep an eye on this and see if it happens more often.

–jeroen

PS, according to the comments in the file it is apparently created by the apache startup script, according to the settings in /etc/sysconfig/apache2.
So maybe it renamed the old one first, then tried to write the new one but couldn’t because the disk was full.
As it failed, it didn’t remove the backup apparently.
I’m just guessing though.