Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoneminder.install post_remove(): Unnecessary output #6

Open
cspenceiv opened this issue Jan 15, 2015 · 3 comments
Open

zoneminder.install post_remove(): Unnecessary output #6

cspenceiv opened this issue Jan 15, 2015 · 3 comments

Comments

@cspenceiv
Copy link
Contributor

Significant amounts of the output provided by the post_remove() function in zoneminder.install can be shrunk down to reduce excessive output.

Files that either existed or are removed that are shared between two packages will leave behind .pacnew, .pacsave, and .pacorig files. After modifying packages (install, update, or remove), users are encouraged to review for those files (https://wiki.archlinux.org/index.php/Pacnew_and_Pacsave_files).

On a side note, I personally use pacdiff to review these files.

I would suggest reducing the output to remind users to resolve the database issues and backup their events, images, and temp directories.

@troywill
Copy link
Owner

Someone did a pretty good write up on the database cleanup. https://wiki.archlinux.org/index.php/ZoneMinder#Flushing_Application_Data.

/etc/http/conf/httpd.conf and /etc/php/php.ini have to be edited manually so there's no .pacorig or .pacsave files and the previous packagers put these instructions into post_remove. They essentially reverse the changes done if the post install instructions are followed. I've been considering a link to the wiki page and/or writing a new wiki page in lieu of these manual instructions.

@cspenceiv
Copy link
Contributor Author

You're right. I forgot that I had those files as a result of using pacman -Rs to clean out test runs of the zoneminder package. It was adding and removing apache2 and php5.

I agree that including a link to the wiki instead would be better. That will also mean fewer package updates for you whenever something changes.

@cspenceiv
Copy link
Contributor Author

I just looked into it some more. We could use the backup variable in the PKGBUILD (https://wiki.archlinux.org/index.php/PKGBUILD#backup) to generate .pac* files for those configuration locations. Finally, instead of loading the zoneminder.install file with the sed commands, we could include them in the package() section which is far more transparent to users. When the package is installed, it will do the checks against the current configuration files to see if the sed commands created a mismatch. At that point, the user can determine what changes need to be made.

The zoneminder.install file could remind to check for .pacnew in the two key locations and refer the user to the wiki for further configuration instructions. This would completely eliminate the need for post_install() system changes. Finally, it would ensure that pacman can do what it does best: manage the files for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants