Edu4rdSHL / blackarch-devtools

Development framework for the BlackArch Linux distribution.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] -I and -b

noraj opened this issue · comments

If I use -I to install a missing dep

    -I, --install-missing <install-missing>...
            Build package files that aren't available in repos. You can specify it multiple times.

like this:

blackarch-devtools -I ../perl-encoding-ber/perl-encoding-ber-1.02-1-any.pkg.tar.xz                                                                                       
Syncing chroot copy /home/noraj/blackarch_chroot/blackarch/ with /home/noraj/blackarch_chroot/root/ ...                                                                                                                                       
Chroot environment is ready!                                                                                                                                                                                                                  
Installing missing packages: ["../perl-encoding-ber/perl-encoding-ber-1.02-1-any.pkg.tar.xz"]                                                                                                                                                 
loading packages...                                                                                                                                                                                                                           
resolving dependencies...                                                                                                                                                                                                                     
looking for conflicting packages...                                                                                                                                                                                                           
                                                                                                                                                                                                                                              
Packages (1) perl-encoding-ber-1.02-1                                                                                                                                                                                                         
                                                                                                                                                                                                                                              
Total Installed Size:  0.05 MiB                                                                                                                                                                                                               
                                                                                                                                                                                                                                              
:: Proceed with installation? [Y/n]                                                                                                                                                                                                           
(1/1) checking keys in keyring                                                                                                                 [########################################################################################] 100%
(1/1) checking package integrity                                                                                                               [########################################################################################] 100%
(1/1) loading package files                                                                                                                    [########################################################################################] 100%
(1/1) checking for file conflicts                                                                                                              [########################################################################################] 100%
(1/1) checking available disk space                                                                                                            [########################################################################################] 100%
:: Processing package changes...                                                                                                                                                                                                              
(1/1) installing perl-encoding-ber                                                                                                             [########################################################################################] 100%
:: Running post-transaction hooks...                                                                                                                                                                                                          
(1/2) Arming ConditionNeedsUpdate...                                                                                                                                                                                                          
(2/2) Warn about old perl modules                                                                                                                                                                                                             
==> Making package: rdp-sec-check 9.5956857-1 (sam. 25 janv. 2020 22:16:32 CET)                                                                                                                                                               
==> Retrieving sources...                                                                                                                                                                                                                     
  -> Updating rdp-sec-check git repo...                                                                                                                                                                                                       
Fetching origin                                                                                                                                                                                                                               
==> Validating source files with sha512sums...                                                                                                                                                                                                
    rdp-sec-check ... Skipped                                                                                                                                                                                                                 
==> Making package: rdp-sec-check 9.5956857-1 (Sat 25 Jan 2020 10:16:35 PM CET)                                                                                                                                                               
==> Checking runtime dependencies...                                                                                                                                                                                                          
==> Checking buildtime dependencies...                                                                                                                                                                                                        
==> Installing missing dependencies..
...

I can see it install the package in the working directory and did not install the package I provided to the -I option.

Then using blackarch-devtools -b on a package that has perl-encoding-ber fails because perl-encoding-ber was not installed.

Am I using the -I option incorrectly? Or is there a bug?

Often I have to create a PKGBUILD for a tool but also for one of its dependencies. In this case using blackarch-devtools -b always fails because I can't install the PKGBUILD of the dependency at the same time or before.

How do you do that?

Hello, @noraj . What are you trying to do? The -I option works in the following way: install the packages you specify there in the clean chroot environment, then build the package of the PKGBUILD in the current dir but doesn't install it.

In short, if you use -I you don't need to use -b, just -I and -b is assumed for PKGBUILD in the current dir.

Scenario:

I'm packaging package A, but package A has a dependency package B that is not in AL or BA so I package it too.

So when I want to build package A with blackarch-devtools the package B dependency is not satisfied and I don't know how to do so.

install the packages you specify

Ah! so -I is like -b but with some "install other deps".

Scenario:

I'm packaging package A, but package A has a dependency package B that is not in AL or BA so I package it too.

So when I want to build package A with blackarch-devtools the package B dependency is not satisfied and I don't know how to do so.

You just need to:

Go to directory of A package, run blackarch-devtools -I path/to/package-B.tar.zst. package-B will be installed in the chroot environment then package A will be build.

$ blackarch-devtools -u
$ cd packages/perl-encoding-ber
$ blackarch-devtools -b
$ cd ../../packages/rdp-sec-check
$ blackarch-devtools -I ../perl-encoding-ber/perl-encoding-ber-1.02-1-any.pkg.tar.xz
$ blackarch-devtools -t -e rdp-sec-check -p rdp-sec-check-9.5956857-1-any.pkg.tar.xz

All good ✔️ Thanks

For documentation you can choose an easy doc tool like https://docsify.js.org/#/ that doesn't need compiling, you deploy it in /docs like I did for this tool https://github.com/Orange-Cyberdefense/haiti/tree/master/docs and you serve it with github pages so you don't need a CI to build the doc.

Then I'll be able to help you creating content for the doc :)

Also please bump to new version (see releases) that build packages in .tar.zst format, very faster. (You need to delete the current blackarch_chroot dir and recreate it, see the release notes).

For documentation you can choose an easy doc tool like https://docsify.js.org/#/ that doesn't need compiling, you deploy it in /docs like I did for this tool https://github.com/Orange-Cyberdefense/haiti/tree/master/docs and you serve it with github pages so you don't need a CI to build the doc.

Then I'll be able to help you creating content for the doc :)

I will have in in mind. Thanks.

Also please bump to new version (see releases) that build packages in .tar.zst format, very faster. (You need to delete the current blackarch_chroot dir and recreate it, see the release notes).

I sure will do that