CN103605520A - Rpm software package conversion method and Rpm software package conversion system - Google Patents

Rpm software package conversion method and Rpm software package conversion system Download PDF

Info

Publication number
CN103605520A
CN103605520A CN201310597153.4A CN201310597153A CN103605520A CN 103605520 A CN103605520 A CN 103605520A CN 201310597153 A CN201310597153 A CN 201310597153A CN 103605520 A CN103605520 A CN 103605520A
Authority
CN
China
Prior art keywords
source code
software package
gem
rpm
project
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310597153.4A
Other languages
Chinese (zh)
Inventor
胡晓英
沈永康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Standard Software Co Ltd
Original Assignee
China Standard Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Standard Software Co Ltd filed Critical China Standard Software Co Ltd
Priority to CN201310597153.4A priority Critical patent/CN103605520A/en
Publication of CN103605520A publication Critical patent/CN103605520A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses an Rpm software package conversion method and an Rpm software package conversion system. The method includes acquiring a gem software package, and backing up the gem software package; enabling the backed-up gem software package to generate an RPM SPEG file through an expansion module command of Ruby language; placing the generated RPM SPEC file and the gem software package into a first catalog and a second catalog which are of set catalog structure, and enabling the set catalog structure to generate an Rpm software package. By the method and the system, software projects programmed by the Ruby language can be automatically converted into software packages with a suffix gem in a batch manner and can be changed into Srpm files finally, so that acquired open-source Ruby source code projects are enabled to be capable of being applied by operating systems using Rpm software package management tools, content of software repositories of the operating systems are enriched and quickly expanded, raw materials are provided for the systems to integrate various application software, links of the development process are reduced, and development efficiency is improved.

Description

Rpm software package conversion method and converting system
Technical field
The present invention relates to computer software fields, relate in particular to a kind of Rpm software package conversion method and converting system.
Background technology
On Internet, exist ,Gai website, a kind of code trustship website to deposit a large amount of, fresh, to adopt all kinds of programming language exploitations project source code.At present, Github website is the code trustship website of main flow, it provides the access of web interface, be similar to the service as SourceForge or Google Code, the project of increasing income source code and the non-project source code of increasing income that trustship provides from the individual or entity of all parts of the world, the project source code of increasing income is disclosed, and freely trustship, but not the project source code of increasing income is covert, need paying trustship.
Cause is a lot of by the software project of Ruby language compilation, and leaves in a large number on Github trustship website, and these projects are all to preserve in the mode of source code catalogue.This script of Ruby is a kind of language of creating for simple and fast object based programming, and it observes GPL agreement and Ruby License.By Ruby language itself, also developed JRuby(Java platform), IronRuby(.NET platform) etc. the Ruby linguistic substitution product of other platforms.
Due to some operating system, operating systems such as Fedora, acceptance of the bid kylin is all by RPM management tool, to be managed each large system parts such as kernel, driving, base library, tool storage room, shape library and application software.
Because these operating systems are these achievements of increasing income that cannot directly use on trustship website, therefore, can cause when developing for this operating system, there is the problem that exploitation link increases, development efficiency reduces, cost of development improves, cannot expand rapidly the software storage of this kind of operating system.
Summary of the invention
One of technical matters to be solved by this invention is that a kind of Rpm software package conversion method need to be provided, the method can be converted to the project source code of non-Rpm software package management the file of Rpm software package management in batches, can effectively reduce cost of development, expand software storage.In addition, also provide a kind of Rpm software package converting system.
In order to solve the problems of the technologies described above, the invention provides a kind of Rpm software package conversion method, comprising: obtain gem software package, and it is backed up; Expansion module order by Ruby language generates RPM SPEC file by backed up gem software package; The RPM SPEC file of generation and gem software package are put into respectively to the first catalogue and the second catalogue of setting bibliographic structure, described setting bibliographic structure is generated to Rpm software package.
In one embodiment, by following steps, obtain gem software package: obtain Ruby source code project; By gem order, Ruby source code is generated to gem software package.
In one embodiment, by following steps, obtain Ruby source code project: step 10, the download address list of obtaining project source code; Step 20 reads a project source code address from this download address list, and according to this project source code address download items source code; Step 30, whether the project source code that judgement is downloaded is Ruby project source code, if not, from described download address list, delete this download address, and whether the download address list of judgement after upgrading be empty, end operation if it is empty, otherwise return to step 20.
In one embodiment, in described step 10, by git order " git checkout URL ", come according to item address download items source code, wherein, " URL " is project source code address.
In one embodiment, in described step 30, by judging in the source code catalogue of project source code, whether exist identification document " gem spec " to judge whether this project source code is Ruby project source code.
In one embodiment, the expansion module order of described Ruby language is gem2rpm module command.
In one embodiment, by fill order " rpmbuild-bs RPMSPEC ", described setting bibliographic structure is generated to Sprm file, and then obtain Rpm software package.
According to a further aspect in the invention, also provide a kind of Rpm software package converting system, having comprised: acquisition module, it obtains Ruby source code project, by gem order, Ruby source code is generated to gem software package, and it is backed up; The first generation module, its expansion module order by Ruby language generates RPM SPEC file by backed up gem software package; The second generation module, it puts into respectively by the RPM SPEC file of generation and gem software package the first catalogue and the second catalogue of setting bibliographic structure, and described setting bibliographic structure is generated to Rpm software package.
In one embodiment, described acquisition module is further used for: step 10, the download address list of obtaining project source code; Step 20 reads a project source code address from this download address list, and comes according to this project source code address download items source code by git order " git checkout URL ", and wherein, " URL " is project source code address; Step 30, by judging in the source code catalogue of project source code, whether exist identification document " gem spec " to judge whether downloaded project source code is Ruby project source code, if not, from described download address list, delete this download address, and whether the download address list after judgement renewal is empty, end operation if it is empty, otherwise return to step 20.
In one embodiment, described the second generation module generates Sprm file by fill order " rpmbuild-bs RPMSPEC " by described setting bibliographic structure, and then obtains Rpm software package.
Compared with prior art, one or more embodiment of the present invention can have the following advantages by tool:
The advantage of this invention is that the batch of robotization is converted to the software project of Ruby language compilation the software package of gem suffix, finally become Srpm file, the Ruby source code project of increasing income that makes to obtain can be used the operating system of Rpm software package management tool and apply, the abundant content that also expands fast the software storage of this operating system, and then provide starting material for the various application software of the system integration, reduce the link of development process, improve development efficiency.
Other features and advantages of the present invention will be set forth in the following description, and, partly from instructions, become apparent, or understand by implementing the present invention.Object of the present invention and other advantages can be realized and be obtained by specifically noted structure in instructions, claims and accompanying drawing.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions,, jointly for explaining the present invention, is not construed as limiting the invention with embodiments of the invention.In the accompanying drawings:
Fig. 1 is the schematic flow sheet of Rpm software package conversion method according to an embodiment of the invention;
Fig. 2 is the structural representation of Rpm software package converting system according to another embodiment of the present invention.
Embodiment
Below with reference to drawings and Examples, describe embodiments of the present invention in detail, to the present invention, how application technology means solve technical matters whereby, and the implementation procedure of reaching technique effect can fully understand and implement according to this.It should be noted that, only otherwise form conflict, each embodiment in the present invention and each feature in each embodiment can mutually combine, and formed technical scheme is all within protection scope of the present invention.
In addition, in the step shown in the process flow diagram of accompanying drawing, can in the computer system such as one group of computer executable instructions, carry out, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
the first embodiment
Fig. 1 transfers Ruby source code to the schematic flow sheet of the method for Rpm software package according to an embodiment of the invention in batches, describes each step of the present embodiment below with reference to Fig. 1 in detail.
Step S110, the download address list of obtaining source code project.
Particularly, the Website development interface that can provide by for example Github Website development, the third-party application program of exploitation is by the development interface of this website, to depart from the mode of web webpage, come direct control Github to license to user's behavior, obtain the address list of the source code of the project of increasing income.
Step S120, judges that whether this download address list is empty, if it is empty, and end operation, otherwise execution step S130.
Step S130 reads an item address from this download address list, and according to this item address download items source code.
Particularly, by git order " git checkout URL ", come according to this item address download items source code.Wherein, " URL " is project source code address, after having downloaded, enters in local source code catalogue.
Step S140, judges whether to download successfully, if unsuccessful, performs step S170.Otherwise execution step S150.
Step S150, whether the project source code that judgement is downloaded is Ruby project source code, if not, perform step S170, otherwise execution step S160.
Particularly, after entering into local source code catalogue, by judging in source code catalogue, whether exist identification document " gem spec " to judge whether this project source code is Ruby project source code.That is to say, detecting while there is " gem spec " file, illustrate that this project source code is Ruby project source code.
It should be noted that, source code catalogue is exactly to deposit the catalogue of original program code, and a general source code catalogue correspondence a project, possesses certain bibliographic structure, for facilitating management project code.
Step S160, enters source code top-level director and carries out Rpm conversion command, and this project source code is converted to the manageable Rpm software package of Rpm software administration.
Particularly, by the expansion module of Ruby, gem2rpm module tool bag is realized the process of conversion.
Further, first-selection, generates gem software package by gem order " gem build GEMSPEC " by Ruby source code, and the gem software package copy generating is a.Then expansion module (gem2rpm module) order by Ruby generates RPM SPEC file by copied gem software package.Again, RPM spec file and gem software package are put into respectively to the first assigned catalogue and the second assigned catalogue of setting bibliographic structure, and in the present embodiment, setting bibliographic structure is rpmbuild, the first assigned catalogue is SPECS catalogue, and the second assigned catalogue is SOURCES catalogue.Finally, to this bibliographic structure fill order " rpmbuild-bs RPMSPEC ", can generate srpm file, obtain Rpm software package.It should be noted that, srpm file, is exactly that sound code file is packaged into the software package form that meets operating system, can be used as source code management and scale-of-two rpm and generates, and scale-of-two rpm finally can be installed in operating system.
By aforesaid operations, the Ruby source code on Github website is changed to SPEC document and then is converted to the required SPEC shelves of RPM software package management tool.
Step S170, deletes this download address in download address list, and whether the download address list of judgement after upgrading be empty, end operation if it is empty, otherwise return to step S130, until all Ruby project source codes are all converted to rear end.
These Ruby project source codes that are all converted into Rpm software package for example can be pushed into and recompilate structure in koji server.
In addition, except the above-mentioned mode of obtaining project source code, can also obtain by the method for copy.For example, for Github website, its core is git distributed version control system, if doing access in system, user arranges, and by the mode of order line, i.e. the mode of non-webpage, the copy command of carrying out git is also to obtain project source code.
It should be noted that, can also directly for example, from other websites (rubygems.org website), obtain in batches the software package of gem suffix.So,, if these gem software packages are downloaded to this locality from rubygems.org website, just can only carry out the flow process that gem software package is converted to srpm file.
In sum, the batch of the present embodiment by robotization be the software package of the software project conversion gem suffix of the Ruby language compilation above Github just, finally becomes the manageable Srpm file of Rpm software package management tool, that is to say, in batches be converted to rpm software package, and put into rpm warehouse.In brief, exactly the source code project of non-RPM management is converted to the source code project of RPM management, and then the content of the software storage of the operating system of abundant and the Rpm of expansion use fast software package management tool, for the various application software of the system integration provide starting material, reduce the link of development process, improve development efficiency.
the second embodiment
Fig. 2 transfers Ruby source code to the structural representation of the system of Rpm software package according to another embodiment of the present invention in batches, describes each composition structure of the present embodiment below with reference to Fig. 2 in detail.
As shown in Figure 2, this system comprises acquisition module 21, the first generation module 22 and the second generation module 23.
Wherein, acquisition module 21 obtains Ruby source code project, by gem order, Ruby source code is generated to gem software package, and it is backed up.
Particularly, this acquisition module 21 is further carried out following steps: step 10, the download address list of obtaining project source code; Step 20 reads a project source code address from this download address list, and comes according to this project source code address download items source code by git order " git checkout URL ", and wherein, " URL " is project source code address; Step 30, by judging in the source code catalogue of project source code, whether exist identification document " gem spec " to judge whether downloaded project source code is Ruby project source code, if not, from described download address list, delete this download address, and whether the download address list after judgement renewal is empty, end operation if it is empty, otherwise return to step 20.
The first generation module 22 generates RPM SPEC file by the expansion module order of Ruby language by backed up gem software package, and this expansion module order is gem2rpm module command.
The second generation module 23 puts into respectively by the RPM SPEC file of generation and gem software package the first catalogue and the second catalogue of setting bibliographic structure, and described setting bibliographic structure is generated to Rpm software package.Particularly, namely RPM spec file and gem software package are put into respectively to the first assigned catalogue and the second assigned catalogue of setting bibliographic structure, in the present embodiment, setting bibliographic structure is rpmbuild, and the first assigned catalogue is SPECS catalogue, and the second assigned catalogue is SOURCES catalogue, finally, to this bibliographic structure fill order " rpmbuild-bs RPMSPEC ", can generate srpm file, obtain Rpm software package.
In sum, the batch of the present embodiment by robotization be the software package of the software project conversion gem suffix of the Ruby language compilation above Github just, finally becomes the manageable Srpm file of Rpm software package management tool, that is to say, in batches be converted to rpm software package, and put into rpm warehouse.In brief, exactly the source code project of non-RPM management is converted to the source code project of RPM management, and then the content of the software storage of the operating system of abundant and the Rpm of expansion use fast software package management tool, for the various application software of the system integration provide starting material, reduce the link of development process, improve development efficiency.
The above; be only preferably embodiment of the present invention, but protection scope of the present invention is not limited to this, any those skilled in the art are in the disclosed technical scope of the present invention; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (10)

1. a Rpm software package conversion method, is characterized in that, comprising:
Obtain gem software package, and it is backed up;
Expansion module order by Ruby language generates RPM SPEC file by backed up gem software package;
The RPM SPEC file of generation and gem software package are put into respectively to the first catalogue and the second catalogue of setting bibliographic structure, described setting bibliographic structure is generated to Rpm software package.
2. method according to claim 1, is characterized in that, by following steps, obtains gem software package:
Obtain Ruby source code project;
By gem order, Ruby source code is generated to gem software package.
3. method according to claim 2, is characterized in that, by following steps, obtains Ruby source code project:
Step 10, the download address list of obtaining project source code;
Step 20 reads a project source code address from this download address list, and according to this project source code address download items source code;
Step 30, whether the project source code that judgement is downloaded is Ruby project source code, if not, from described download address list, delete this download address, and whether the download address list of judgement after upgrading be empty, end operation if it is empty, otherwise return to step 20.
4. method according to claim 3, is characterized in that, in described step 10,
By git order " git checkout URL ", come according to item address download items source code, wherein, " URL " is project source code address.
5. method according to claim 3, is characterized in that, in described step 30,
By judging in the source code catalogue of project source code, whether exist identification document " gem spec " to judge whether this project source code is Ruby project source code.
6. according to the method described in any one in claim 1-5, it is characterized in that,
The expansion module order of described Ruby language is gem2rpm module command.
7. method according to claim 1, is characterized in that,
By fill order " rpmbuild-bs RPMSPEC ", described setting bibliographic structure is generated to Sprm file, and then obtain Rpm software package.
8. a Rpm software package converting system, is characterized in that, comprising:
Acquisition module, it obtains Ruby source code project, by gem order, Ruby source code is generated to gem software package, and it is backed up;
The first generation module, its expansion module order by Ruby language generates RPMSPEC file by backed up gem software package;
The second generation module, it puts into respectively by the RPM SPEC file of generation and gem software package the first catalogue and the second catalogue of setting bibliographic structure, and described setting bibliographic structure is generated to Rpm software package.
9. system according to claim 8, is characterized in that, described acquisition module is further used for:
Step 10, the download address list of obtaining project source code;
Step 20 reads a project source code address from this download address list, and comes according to this project source code address download items source code by git order " git checkoutURL ", and wherein, " URL " is project source code address;
Step 30, by judging in the source code catalogue of project source code, whether exist identification document " gem spec " to judge whether downloaded project source code is Ruby project source code, if not, from described download address list, delete this download address, and whether the download address list after judgement renewal is empty, end operation if it is empty, otherwise return to step 20.
10. system according to claim 8, is characterized in that, described the second generation module generates Sprm file by fill order " rpmbuild-bs RPMSPEC " by described setting bibliographic structure, and then obtains Rpm software package.
CN201310597153.4A 2013-11-22 2013-11-22 Rpm software package conversion method and Rpm software package conversion system Pending CN103605520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310597153.4A CN103605520A (en) 2013-11-22 2013-11-22 Rpm software package conversion method and Rpm software package conversion system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310597153.4A CN103605520A (en) 2013-11-22 2013-11-22 Rpm software package conversion method and Rpm software package conversion system

Publications (1)

Publication Number Publication Date
CN103605520A true CN103605520A (en) 2014-02-26

Family

ID=50123750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310597153.4A Pending CN103605520A (en) 2013-11-22 2013-11-22 Rpm software package conversion method and Rpm software package conversion system

Country Status (1)

Country Link
CN (1) CN103605520A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461567A (en) * 2014-12-24 2015-03-25 北京奇虎科技有限公司 Method and system for releasing software package
CN107220147A (en) * 2017-05-25 2017-09-29 郑州云海信息技术有限公司 A kind of system image preparation method and system
CN107908930A (en) * 2017-11-14 2018-04-13 郑州云海信息技术有限公司 A kind of method and system of encapsulation License
CN109002298A (en) * 2018-10-01 2018-12-14 曾鸿坤 A kind of automatic deployment of third-party platform trustship project generic is to cloud platform method
CN109828786A (en) * 2017-11-23 2019-05-31 中标软件有限公司 Automated tool based on code-level support sw _64 architecture
CN111679855A (en) * 2020-08-11 2020-09-18 中软信息系统工程有限公司 Application software package conversion method, management method and device
CN113076115A (en) * 2021-04-21 2021-07-06 扬州万方电子技术有限责任公司 Basic software packaging method based on domestic platform

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
LEO_TODY: "《ChinaUnix博客,http://blog.chinaunix.net/uid-22322105-id-3036820.html》", 8 December 2011 *
LIJIANWEIABCDE: "《ChinaUnix博客,http://blog.chinaunix.net/uid-23849526-id-134904.html》", 23 February 2011 *
MARGUERITESU: "《Wiki>openSUSE:Packaging Ruby, https://zh.opensuse.org/index.php?title=openSUSE:Packaging_Ruby&oldid=6932》", 11 November 2012 *
曾少宁 等: "《读书频道>移动开发>Android>1.6.2 使用Git下载Android源代码,http://book.51cto.com/art/201212/372161.htm》", 15 December 2012 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461567A (en) * 2014-12-24 2015-03-25 北京奇虎科技有限公司 Method and system for releasing software package
CN107220147A (en) * 2017-05-25 2017-09-29 郑州云海信息技术有限公司 A kind of system image preparation method and system
CN107908930A (en) * 2017-11-14 2018-04-13 郑州云海信息技术有限公司 A kind of method and system of encapsulation License
CN109828786A (en) * 2017-11-23 2019-05-31 中标软件有限公司 Automated tool based on code-level support sw _64 architecture
CN109002298A (en) * 2018-10-01 2018-12-14 曾鸿坤 A kind of automatic deployment of third-party platform trustship project generic is to cloud platform method
CN111679855A (en) * 2020-08-11 2020-09-18 中软信息系统工程有限公司 Application software package conversion method, management method and device
CN113076115A (en) * 2021-04-21 2021-07-06 扬州万方电子技术有限责任公司 Basic software packaging method based on domestic platform
CN113076115B (en) * 2021-04-21 2023-12-26 扬州万方科技股份有限公司 Basic software packaging method based on domestic platform

Similar Documents

Publication Publication Date Title
CN103605520A (en) Rpm software package conversion method and Rpm software package conversion system
CN100449524C (en) Servicing a component-based software product
CN108319460B (en) Method and device for generating application program installation package, electronic equipment and storage medium
US9823915B1 (en) Software container format
CN109491695A (en) A kind of increment updating method of integrated Android application
US9754242B2 (en) Deployment mechanism for non-versioning business process artifacts
CN110032388B (en) Incremental file construction, publishing and downloading method and device
CN106933887B (en) Data visualization method and device
CN111831258A (en) Method and system for creating application program
JP2007122135A (en) Development support device, development support method and development support program
CN101719074A (en) patch-realizing method and device
CN104461723A (en) Process control method, device and system
CN103761107A (en) Software package customizing device and method
WO2023130933A1 (en) Model processing method and apparatus, code aquisition method and apparatus, and electronic device
CN110928780B (en) Code quality control method, device, computer equipment and storage medium
CN115220863A (en) Operation and maintenance method and device for container application, computer equipment and storage medium
CN110727575B (en) Information processing method, system, device and storage medium
CN105404522A (en) Method for building intelligent terminal application program, device for building intelligent terminal application program and intelligent terminal
CN107608672B (en) UI module manager, UI module management method and system
CN104461509A (en) Information interaction framework and method
CN103425515A (en) Method and system for updating software client terminal
US10284628B2 (en) Distribution method and resource acquisition method
US9519470B2 (en) Information processing system, information processing apparatus, device, software installation method, and storage medium for executing software installation
CN102622226B (en) A kind of method generating Linux software package storage
CN106598663B (en) Web application updating method and web server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140226

RJ01 Rejection of invention patent application after publication