Hi DongInn,

I'm still in oscar-packager code. bin/oscar-packager is mostly clean, 
lib/Packager.pm is 80% clean
but Packman.pm is not clean and some problems are are here (dependancies 
installation failure codes lost?).

I'm ok with all the points you've listed.

Another feature that could help later would be to rework the 
/etc/oscar/oscar-packager directory structure.
just like /etc/yum.repos moved to /etc/yum.repos.d/*.repo we could have
/etc/oscar/oscar-packager/*unstable.cfg moved to 
/etc/oscar/oscar-packager/unstable/{core,included,contributed}/{one .cfg per 
package containing both main package and meta package}
content could be:
source = svn, http://.....
opkg = svn, http://.....

Want a new contributed package => add the new_contributed_package.cfg into 
/etc/oscar/oscar-packager/unstable/contributed/ and start oscar-packager...
=> For oscar7 ;-) (before that there are some bugs to fix).

Regarding the build process......
I have always in mind the debian side of things.......And it's not an easy 
point as debian doesn't have the .spec concept.
Thus, for the moment, I'd like to avoid removing support for the Makefiles. 
I've disabled all calls for the rpm: rule when relevant, but for the deb side, 
I can't tell, I'd need to work on my ubuntu VM.

- the build.cfg is optional for the moment: no build.cfg => no dependancies and 
the build is done using the make command as we don't know where is the source...
- the <package_name>.cfg: can contain a src.rpm: what should we do if under 
debian......Problem. here. If we have a tarball, then we can build debian 
package....
Question: do you think that we could enhance the package.cfg with sections so 
different sources could be used([rhel|fc:*:*] source= ... [debian:*:*])?
- The Makefile: used in components like oscar-base, opkgc, ...So disabling it 
may not be a good idea (at least until build.cfg and <package_name>.cfg are 
created.

For the moment, I think that the debian side is not broken (or if it is broken, 
it's easy to fix). I'll work on that soon. One thing is sure, many packages 
were not available under debian, so when needs to be checked in the 1st place 
is when starting oscar-packager, how will it react toward all packages where I 
added a build.cfg and all packages added. (I think that the most common 
problems will be the require: section in build.cfg that are either not 
available or wrong.

I'll work on that just after fixing oscar-packager.

Regards,

Olivier.

--
   Olivier LAHAYE
   CEA DRT/LIST/DCSI/DIR
________________________________
De : DongInn Kim [di...@cs.indiana.edu]
Date d'envoi : mardi 9 avril 2013 14:07
À : oscar-devel@lists.sourceforge.net
Objet : Re: [Oscar-devel] oscar-packager: code review in progress.

Hi Olivier,

- now Packager.pm uses the --verbose and --debug switches from main instead of 
hardcodding them..
Great
- now, if verbosity is 0, only main actions are printed.(skipping already built 
pkgs, building pkgs, installing deps,…)
Thanks.
- added a extract_file function to OSCAR::FileUtils (avoid hardcoding tar xzf 
and fail on bz2 tarballs)
Nice. :-)


This is good and I would like to point out several things regarding to the 
improvement of oscar-packager.

1. oscar-packager should not re-build packages which are already built (I think 
this is already done.) -- OK.
    But if we add the --force option, it will rebuild the packages regardlessly.
    OR if we specify the package name with / without --force, it will rebuild 
only the package whether it is already built or not.

2. oscar-packager should be able to list up all the compiled package (I think 
this is already done.) -- OK.
    All the compiled packages including opkgs are listed with its type and 
built time on /etc/oscar/oscar-packager/.oscar_pkgs

3. oscar-packager should be able to list up any not completed packages with its 
type (package or opkg).

4. oscar-packager should be able to show the list of all the OSCAR packages and 
opkgs to build.
   This could be trivial but we have not done it yet. We can simply find this 
by referring to the corresponding /etc/oscar/oscar-packager/*.cfg files but it 
is a little bit annoying to find the list manually.


I think 3 and 4 are not done yet. Besides, I hope that your effort to clean up 
the oscar-packager codes has considered the consistent and simple build process 
of a package too.
So, do we still need to have Makefile?
build.cfg is mandatory?
<package_name>.cfg is optional?
rpm/ and deb/ are optional?

Regards,

--
- DongInn

On Apr 9, 2013, at 6:42 AM, 
olivier.laha...@free.fr<mailto:olivier.laha...@free.fr> wrote:


DongInn,

I'm currently cleaning oscar-packager code.
- now Packager.pm uses the --verbose and --debug switches from main instead of 
hardcodding them.
- now, if verbosity is 0, only main actions are printed.(skipping already built 
pkgs, building pkgs, installing deps,...)
- added a extract_file function to OSCAR::FileUtils (avoid hardcoding tar xzf 
and fail on bz2 tarballs)

Nothing yet committed, please wait a few hours, I need to crosscheck 
everything. This will require a oscar-base-libs upgrade.

(As you can see there are errors, but the 100% success is reported......The 
failure is lost somewhere).

Example of output:
[root@is222272 ~]# oscar-packager --all unstable
Verbosity: 0

=============================================================================
== OSCAR Packager Starting...
=============================================================================

[INFO] --> The package (c3) is already built.
[INFO] --> The package (sc3) is already built.
[INFO] --> The package (oscar) is already built.
[INFO] --> The package (oscar-packager) is already built.
[INFO] --> The package (orm) is already built.
[INFO] --> The package (configurator) is already built.
[INFO] --> The package (systemconfigurator) is already built.
[INFO] --> The package (opkgc) is already built.
[INFO] --> The package (oda) is already built.
[INFO] --> The package (kernel_picker) is already built.
[INFO] --> The package (selector) is already built.
[INFO] --> The package (packman) is already built.
[INFO] Packaging systemimager...
[ requires: libuuid-devel device-mapper-devel binutils-devel pam-devel 
readline-devel openssl-devel ncurses-devel python-devel libuuid-devel 
glib2-devel glibc-static requires: gettext docbook-utils dos2unix flex libtool 
wget gcc gcc-c++ gperf bc rsync lzop desktop-file-utils python 
python-twisted-core PyXML requires: systemd-units common: flamethrower common: 
bittorrent common: systemimager ]
Array: 6 element(s)
Erreur : Aucun paquet correspondant à lister
Erreur : Aucun paquet correspondant à lister
Erreur : Aucun paquet correspondant à lister
ERROR: Impossible to execute "yum -c /tmp/fileZh4cmD info 
systemd-units.noarch"; some packages are not available (-y, install, 
systemd-units) at /bin/yume line 313.
ERROR during execution 6400
Use of uninitialized value $output[0] in join or string at 
/usr/share/perl5/vendor_perl/OSCAR/PackMan.pm line 656.
ERROR: Impossible to install systemd-units () at /usr/bin/packman line 150.
Warning: failed to install requires: systemd-units
Fichier «bittorrent-5.3-5.cf.rhel6.src.rpm» déjà présent; pas de récupération.

Building only RPMs, passed arguments are interpreted as SRPMs
Executing: mv ./*bittorrent*.rpm /tftpboot/oscar/fc-17-x86_64
Fichier «systemimager-4.3.0-0.8.src.rpm» déjà présent; pas de récupération.

Building only RPMs, passed arguments are interpreted as SRPMs
Executing: mv ./*systemimager*.rpm /tftpboot/oscar/fc-17-x86_64
Fichier «flamethrower-0.1.8-2.src.rpm» déjà présent; pas de récupération.

Building only RPMs, passed arguments are interpreted as SRPMs
Executing: mv ./*flamethrower*.rpm /tftpboot/oscar/fc-17-x86_64
[INFO] --> The package (rapt) is already built.
[INFO] --> The package (systeminstaller-oscar) is already built.
[INFO] --> The package (sync_files) is already built.
[INFO] --> The package (oscar-installer) is already built.
[INFO] --> The package (yume) is already built.
[INFO] --> The package (loghost) is already built.
[INFO] --> The package (opium) is already built.

=============================================================================
== [INFO] Generated binary packages are in /tftpboot/oscar/fc-17-x86_64
=============================================================================


=============================================================================
== Creating OPKG meta-packages...
=============================================================================


=============================================================================
== [INFO] Generated binary packages are in /tftpboot/oscar/fc-17-x86_64
=============================================================================

[INFO] --> The package (blcr) is already built.
[INFO] --> The package (jobmonarch) is already built.
[INFO] --> The package (pvm) is already built.
[INFO] --> The package (oscar-nat) is already built.
[INFO] --> The package (modules-oscar) is already built.
[INFO] --> The package (oscar-v) is already built.
[INFO] --> The package (torque) is already built.
[INFO] --> The package (ganglia) is already built.
[INFO] --> The package (switcher) is already built.
[INFO] --> The package (openmpi) is already built.
[INFO] --> The package (netbootmgr) is already built.
[INFO] --> The package (apitest) is already built.
[INFO] --> The package (lam) is already built.
[INFO] --> The package (oscar-udev) is already built.
[INFO] --> The package (network-configurator) is already built.
[INFO] --> The package (maui) is already built.
[INFO] --> The package (system-update) is already built.
[INFO] --> The package (pfilter) is already built.

=============================================================================
== [INFO] Generated binary packages are in /tftpboot/oscar/fc-17-x86_64
=============================================================================


=============================================================================
== Creating OPKG meta-packages...
=============================================================================


=============================================================================
== [INFO] Generated binary packages are in /tftpboot/oscar/fc-17-x86_64
=============================================================================


=============================================================================
== OSCAR Packager compilation results:
=============================================================================

[INFO] --> Packaging was 100% successfull!

=============================================================================
== OSCAR Packager Ending
=============================================================================


Olivier.

--
   Olivier LAHAYE

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net<mailto:Oscar-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/oscar-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to