Tips for rebuilding your own packages

Really great! :smile:

I only have to change
git_uri = ssh://git@github.com/OpenMandrivaAssociation
to
git_uri = https://git@github.com/OpenMandrivaAssociation
in .abfcfg.

You may put it where you like. Also I encourage you to make some practise with package null so you’ll see all by yourself:

abf get null
cd null
abf rpmbuild
1 Like

@TPG I’ve just built some null project on official repo instead of mine :flushed: . I apologise for the inconvenient and please ignore them. in this way I discovered abf get clone from openmandirva repository instead from mine. Is there a way to (fork and) clone from my own repo?

@mandian That’s no problem, as what is for null package :+1:

1 Like

@adelson.oliveira Yes it does differ as it uses by default anything that is needed to build proper rpm for OpenMandriva.

All the output is inside package directory.

1 Like

Please do not use it. Do not use any “external” macros like this one.

Our %make by default recognizes how many CPUs do you have onboard and set proper amount for “-j” switch.

1 Like

Is fork the command to start to work on a package in my repo?

$  abf fork openmandriva/null
No group named 'mandian', will fork to your personal platform
Internal server error: it has returned non-json data. 
<html><head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>404</title>
  <link href='//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' media="screen" rel="stylesheet" type="text/css">
  <style type="text/css">

  </style>
</head>
<body>
  <noscript>
    <div style='font-size: 12px; color: red; font-weight: bold;'>You need javascript to properly use this site</div>
  </noscript>
  <article >
    <div class='row'>
      <div class='col-md-6 col-md-offset-3 text-center'>
        <div class="all error404">
          <h1>Error <span>404</span></h1>
          <h2>Page not found</h2>
          <p class="pages">
            Try to open other pages.
          </p>
          <p class="search">
            Or use the search.
          </p>
        </div>
      </div>
    </div>
  </article>
</body></html>
1 Like

@mandian usually --help gives some help :slight_smile:
[tpg@lazur task-plasma]$ abf fork --help
usage: abf fork [-h] [-v] source_project [target_project]

positional arguments:
source_project project to fork (group/project)
target_project target project group and name (group/project)

optional arguments:
-h, --help show this help message and exit
-v, --verbose be verbose, display even debug messages

1 Like

I’ve red help message and rosa wiki but there isi still something not so clear to me. I assume the following

group   -> openmandriva
project -> mandian/null

But I receive some error in any case.

First try into abf. I’ve installed with urpmi. I sign up into abf.openmandriva.org. Before this, in command line,

$ abf get scilab

But I messed up with messages I received. I tried again (already signed up at abf.openmandriva.org),

$ abf get scilab
Cloning into ‘scilab’…
Warning: Permanently added the RSA host key for IP address ‘192.30.253.112’ to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@adelson.oliveira please make sure you accepted invitation to our github repository

I changed the following line

git_uri = ssh://git@github.com/OpenMandrivaAssociation

into

git_uri = https://git@github.com/OpenMandrivaAssociation

in $HOME/.abfcfg. I’m not sure it’s the right way.

I’ve sign up at gitHub before doing this at abf. Should I have only one account for both of you just mean there is something I missed when I signed up for abf?

I meant,

Should I have only one account for both or you just mean there is something I missed when I signed up for abf?

I did the change ssh to https in git_uri in .abfcfg file, as Mandian suggested. It worked fine, scilab was downloaded.

$ abf get scilab
Cloning into ‘scilab’…
Branch exit is missing, will use HEAD

I noticed, in this case where no src.rpm file is available, the command “abf get scilab” did not help much.
Nothing was installed. Thus, I think I am at the same point where I was before, I have to check for possible patches to be applied, download the newer source and patches, alter scilab.spec manually and then try “abf rpmbuild scilab.spec”. If building requires are not downloaded I will do it also manually and do rpmrebuild scilab.spec.

Isn’t it?

@adelson.oliveira

abf get scilab

This will download sources fron github repository
https://github.com/OpenMandrivaAssociation/scilab

This command will not download src.rpm file.

Yes, it’s so. But with abf you may take advantage to work is a git repo.

This will install all building requires it for you :slight_smile:

sudo urpmi --buildrequires scilab.spec

Thanks, I will remember this when really rebuilding an existing package. However, for scilab, I want a new version update (5.5.2 => 6.0.0), source is different, patches are different. I will use the spec for 5.5.2 as a guide (so as to keep openmandriva signaturure) and everything else I will download from elsewhere. Please, let me know if I should proceed differently.

By now, I’m checking fedora and mageia src.rpm packages.

Almost there! But I would like to minimize mistakes. I’ve noticed the source (scilab tar.gz) from mageia and fedora are binary equal (diff does not see any difference) but the source I’ve downloaded from scilab’s home page, after unzip and tar -zcxf, differs from that in mageia and fedora by about 1MB.

Then, to check for this difference, I’ve compared the extracted directories by diff -r. The result is about 5 times the original sources. A close look at the difference only in the ACKNOWLEDGMENT file shows that they are virtually equal but the scilab’s home page file has a kind of ENTER command ending every single line (^M).

The question is, is there a way to get rid of this endoflline mark or, if not, to see the differences in file ignoring this mark?

Thanks a lot.

With diff you may use --strip-trailing-cr option.

However imho fedora spec is not the best for OpenMandriva. You may use it as a guideline for patch and required packages and some other stuff but the way is to get the OpenMandriva spec and to modify it. Also I’d try to build scilab with clang as openmp has been added now.

I found out that some “BuiidRequires” were removed for scilab 6.0 as well as others were added. Thus, in my limited experience/skills, it seemed useful to me to compare the OMV spec for scilab 5 and other distros’ scilab specs for version 6.0.

The --strip-trailing-cr worked fine. Now, the recursive diff between directories (scilab homepage downloaded and mageia’s directories) is just 176KB. However, It did not helped much. I could not find a rosa’s rpm for scilab 6.0.0.

Mandian, if you end up the scilab 6.0.0 build for OMV before I do, I will use it and inspect it to learn more on what I should have done. There are other packages I need and acquiring some experience on building them can help me.

Thanks.