[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Protect directory/file ?



On 2007-08-14, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> wrote:
> Ondrej Balaz <ondra@blami.net> writes:
>
>> I'm sorry, my english is worse.
>>
>> Hello,
>> exists any way to protect directories and files against apt/dpkg changes ?
>>
>> I'm using lot of modifications to make my Debian perfect for me (for example
>> modified init scripts, udev rules or my own /etc/apache2 layout). This is big
>> pain everytime when I update packages - all files meant as program parts (no
>> configuration files) are overwritten and changes I've made are lost. Then
>> I must move proper files from my backup to their directories.
>
> Nothing in etc is a programm file. So they won't be overwritten.
>
>> Now I'm looking for a better hack/workaround to protect my modifications. I 
>> wonder if is it possible to redirect package files extraction to another 
>> directory (for example to put .protect file to /etc containing line 
>> REDIRECT="/tmp/etc-apt" and then all attempts to write file in /etc or
>> its subdirectories will be redirected to the /tmp/etc-apt/...)
>>
>> I found something similar in tool dpkg-divert, but its oriented to single files
>> and maintaining long list of contents of all directories will be bigger pain
>> than rewriting parts of hdd with my "overlay".
>
> There is only dpkg-divert for non conffiles if you don't use
> debs. What you should do is put all your modifications (non conffiles)
> into a debian package and set appropriate "Replaces: foobar" entries
> in the control file. That way dpkg will know you overwrite files from
> package 'foobar' and keep your version even when foobar gets
> updated. It will also warn you if you overwrite files from other not
> listed packages (or they your files).
>

Thank you :)

>> Thank you,
>> Ondra.
>
> MfG
>         Goswin
>
>


-- 
(o_  Ondrej 'blami' Balaz 
//\  
V_/_



Reply to: