Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 4781  / 3 Years ago, wed, november 3, 2021, 6:34:00

I have a package which has bug, and i need to modify it, and repack it, So thats how i am doing. Is there any other quick methods?




  1. List/View only (drivers files or applications)



    ar tv DesktopVideo-8.0.1-amd64.deb
    rw-r--r-- 0/0 4 Sep 25 07:35 2011 debian-binary
    rw-r--r-- 0/0 14942208 Sep 25 07:35 2011 control.tar.gz
    rw-r--r-- 0/0 102 Sep 25 07:35 2011 data.tar.gz

  2. Extract



    ar x DesktopVideo-8.0.1-amd64.deb
    control.tar.gz data.tar.gz debian-binary

  3. Extract tar.gz



    tar xvfz control.tar.gz
    tar xvfz data.tar.gz
    ;; modify my codes and updates

  4. Repack/Rebuild this back



    mkdir -p debian/DEBIAN
    ; step 1
    cp -R ./debian-binary debina/DEBIAN
    cp -R ./control debian/DEBIAN
    cp -R ./control debian/DEBIAN
    cp -R ./control debian/DEBIAN
    ; step 2
    cp -R ./etc debian/DEBIAN
    cp -R ./usr debian/DEBIAN

  5. Make .DEB now



    ; this is how the skeleton look like before applying --build
    root@desktop:~/Downloads/test# ls
    control.tar.gz data.tar.gz debian debian-binary etc usr

    root@desktop:~/Downloads/test# dpkg-deb --build debian
    dpkg-deb: building package `desktopvideo' in `debian.deb'.



-- Failed



# dpkg -i DesktopVideo-8.0.1-amd64.deb
dpkg: error processing DesktopVideo-8.0.1-amd64.deb (--install):
unable to open file '/var/lib/dpkg/tmp.ci//etc': Is a directory
Errors were encountered while processing:
DesktopVideo-8.0.1-amd64.deb

More From » packaging

 Answers
5

If you haven't already, install the build tools: sudo apt-get install build-essential



You can use the apt-get source DesktopVideo command to pull the source, diffs, and all other packaging files associated with that deb into the current directory. From there apply your patch, add a new entry in the log file dch -i, then use fakeroot and dpkg to create the package dpkg-buildpackage -rfakeroot -us -uc


[#43353] Thursday, November 4, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
homerurhyth

Total Points: 338
Total Questions: 113
Total Answers: 105

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
;