commit
4a49913eb5
216 changed files with 10895 additions and 0 deletions
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
.vagrant/* |
||||
*.log |
||||
*.box |
||||
*.vdi |
||||
@ -0,0 +1,674 @@
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE |
||||
Version 3, 29 June 2007 |
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
||||
Everyone is permitted to copy and distribute verbatim copies |
||||
of this license document, but changing it is not allowed. |
||||
|
||||
Preamble |
||||
|
||||
The GNU General Public License is a free, copyleft license for |
||||
software and other kinds of works. |
||||
|
||||
The licenses for most software and other practical works are designed |
||||
to take away your freedom to share and change the works. By contrast, |
||||
the GNU General Public License is intended to guarantee your freedom to |
||||
share and change all versions of a program--to make sure it remains free |
||||
software for all its users. We, the Free Software Foundation, use the |
||||
GNU General Public License for most of our software; it applies also to |
||||
any other work released this way by its authors. You can apply it to |
||||
your programs, too. |
||||
|
||||
When we speak of free software, we are referring to freedom, not |
||||
price. Our General Public Licenses are designed to make sure that you |
||||
have the freedom to distribute copies of free software (and charge for |
||||
them if you wish), that you receive source code or can get it if you |
||||
want it, that you can change the software or use pieces of it in new |
||||
free programs, and that you know you can do these things. |
||||
|
||||
To protect your rights, we need to prevent others from denying you |
||||
these rights or asking you to surrender the rights. Therefore, you have |
||||
certain responsibilities if you distribute copies of the software, or if |
||||
you modify it: responsibilities to respect the freedom of others. |
||||
|
||||
For example, if you distribute copies of such a program, whether |
||||
gratis or for a fee, you must pass on to the recipients the same |
||||
freedoms that you received. You must make sure that they, too, receive |
||||
or can get the source code. And you must show them these terms so they |
||||
know their rights. |
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: |
||||
(1) assert copyright on the software, and (2) offer you this License |
||||
giving you legal permission to copy, distribute and/or modify it. |
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains |
||||
that there is no warranty for this free software. For both users' and |
||||
authors' sake, the GPL requires that modified versions be marked as |
||||
changed, so that their problems will not be attributed erroneously to |
||||
authors of previous versions. |
||||
|
||||
Some devices are designed to deny users access to install or run |
||||
modified versions of the software inside them, although the manufacturer |
||||
can do so. This is fundamentally incompatible with the aim of |
||||
protecting users' freedom to change the software. The systematic |
||||
pattern of such abuse occurs in the area of products for individuals to |
||||
use, which is precisely where it is most unacceptable. Therefore, we |
||||
have designed this version of the GPL to prohibit the practice for those |
||||
products. If such problems arise substantially in other domains, we |
||||
stand ready to extend this provision to those domains in future versions |
||||
of the GPL, as needed to protect the freedom of users. |
||||
|
||||
Finally, every program is threatened constantly by software patents. |
||||
States should not allow patents to restrict development and use of |
||||
software on general-purpose computers, but in those that do, we wish to |
||||
avoid the special danger that patents applied to a free program could |
||||
make it effectively proprietary. To prevent this, the GPL assures that |
||||
patents cannot be used to render the program non-free. |
||||
|
||||
The precise terms and conditions for copying, distribution and |
||||
modification follow. |
||||
|
||||
TERMS AND CONDITIONS |
||||
|
||||
0. Definitions. |
||||
|
||||
"This License" refers to version 3 of the GNU General Public License. |
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of |
||||
works, such as semiconductor masks. |
||||
|
||||
"The Program" refers to any copyrightable work licensed under this |
||||
License. Each licensee is addressed as "you". "Licensees" and |
||||
"recipients" may be individuals or organizations. |
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work |
||||
in a fashion requiring copyright permission, other than the making of an |
||||
exact copy. The resulting work is called a "modified version" of the |
||||
earlier work or a work "based on" the earlier work. |
||||
|
||||
A "covered work" means either the unmodified Program or a work based |
||||
on the Program. |
||||
|
||||
To "propagate" a work means to do anything with it that, without |
||||
permission, would make you directly or secondarily liable for |
||||
infringement under applicable copyright law, except executing it on a |
||||
computer or modifying a private copy. Propagation includes copying, |
||||
distribution (with or without modification), making available to the |
||||
public, and in some countries other activities as well. |
||||
|
||||
To "convey" a work means any kind of propagation that enables other |
||||
parties to make or receive copies. Mere interaction with a user through |
||||
a computer network, with no transfer of a copy, is not conveying. |
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" |
||||
to the extent that it includes a convenient and prominently visible |
||||
feature that (1) displays an appropriate copyright notice, and (2) |
||||
tells the user that there is no warranty for the work (except to the |
||||
extent that warranties are provided), that licensees may convey the |
||||
work under this License, and how to view a copy of this License. If |
||||
the interface presents a list of user commands or options, such as a |
||||
menu, a prominent item in the list meets this criterion. |
||||
|
||||
1. Source Code. |
||||
|
||||
The "source code" for a work means the preferred form of the work |
||||
for making modifications to it. "Object code" means any non-source |
||||
form of a work. |
||||
|
||||
A "Standard Interface" means an interface that either is an official |
||||
standard defined by a recognized standards body, or, in the case of |
||||
interfaces specified for a particular programming language, one that |
||||
is widely used among developers working in that language. |
||||
|
||||
The "System Libraries" of an executable work include anything, other |
||||
than the work as a whole, that (a) is included in the normal form of |
||||
packaging a Major Component, but which is not part of that Major |
||||
Component, and (b) serves only to enable use of the work with that |
||||
Major Component, or to implement a Standard Interface for which an |
||||
implementation is available to the public in source code form. A |
||||
"Major Component", in this context, means a major essential component |
||||
(kernel, window system, and so on) of the specific operating system |
||||
(if any) on which the executable work runs, or a compiler used to |
||||
produce the work, or an object code interpreter used to run it. |
||||
|
||||
The "Corresponding Source" for a work in object code form means all |
||||
the source code needed to generate, install, and (for an executable |
||||
work) run the object code and to modify the work, including scripts to |
||||
control those activities. However, it does not include the work's |
||||
System Libraries, or general-purpose tools or generally available free |
||||
programs which are used unmodified in performing those activities but |
||||
which are not part of the work. For example, Corresponding Source |
||||
includes interface definition files associated with source files for |
||||
the work, and the source code for shared libraries and dynamically |
||||
linked subprograms that the work is specifically designed to require, |
||||
such as by intimate data communication or control flow between those |
||||
subprograms and other parts of the work. |
||||
|
||||
The Corresponding Source need not include anything that users |
||||
can regenerate automatically from other parts of the Corresponding |
||||
Source. |
||||
|
||||
The Corresponding Source for a work in source code form is that |
||||
same work. |
||||
|
||||
2. Basic Permissions. |
||||
|
||||
All rights granted under this License are granted for the term of |
||||
copyright on the Program, and are irrevocable provided the stated |
||||
conditions are met. This License explicitly affirms your unlimited |
||||
permission to run the unmodified Program. The output from running a |
||||
covered work is covered by this License only if the output, given its |
||||
content, constitutes a covered work. This License acknowledges your |
||||
rights of fair use or other equivalent, as provided by copyright law. |
||||
|
||||
You may make, run and propagate covered works that you do not |
||||
convey, without conditions so long as your license otherwise remains |
||||
in force. You may convey covered works to others for the sole purpose |
||||
of having them make modifications exclusively for you, or provide you |
||||
with facilities for running those works, provided that you comply with |
||||
the terms of this License in conveying all material for which you do |
||||
not control copyright. Those thus making or running the covered works |
||||
for you must do so exclusively on your behalf, under your direction |
||||
and control, on terms that prohibit them from making any copies of |
||||
your copyrighted material outside their relationship with you. |
||||
|
||||
Conveying under any other circumstances is permitted solely under |
||||
the conditions stated below. Sublicensing is not allowed; section 10 |
||||
makes it unnecessary. |
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
||||
|
||||
No covered work shall be deemed part of an effective technological |
||||
measure under any applicable law fulfilling obligations under article |
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or |
||||
similar laws prohibiting or restricting circumvention of such |
||||
measures. |
||||
|
||||
When you convey a covered work, you waive any legal power to forbid |
||||
circumvention of technological measures to the extent such circumvention |
||||
is effected by exercising rights under this License with respect to |
||||
the covered work, and you disclaim any intention to limit operation or |
||||
modification of the work as a means of enforcing, against the work's |
||||
users, your or third parties' legal rights to forbid circumvention of |
||||
technological measures. |
||||
|
||||
4. Conveying Verbatim Copies. |
||||
|
||||
You may convey verbatim copies of the Program's source code as you |
||||
receive it, in any medium, provided that you conspicuously and |
||||
appropriately publish on each copy an appropriate copyright notice; |
||||
keep intact all notices stating that this License and any |
||||
non-permissive terms added in accord with section 7 apply to the code; |
||||
keep intact all notices of the absence of any warranty; and give all |
||||
recipients a copy of this License along with the Program. |
||||
|
||||
You may charge any price or no price for each copy that you convey, |
||||
and you may offer support or warranty protection for a fee. |
||||
|
||||
5. Conveying Modified Source Versions. |
||||
|
||||
You may convey a work based on the Program, or the modifications to |
||||
produce it from the Program, in the form of source code under the |
||||
terms of section 4, provided that you also meet all of these conditions: |
||||
|
||||
a) The work must carry prominent notices stating that you modified |
||||
it, and giving a relevant date. |
||||
|
||||
b) The work must carry prominent notices stating that it is |
||||
released under this License and any conditions added under section |
||||
7. This requirement modifies the requirement in section 4 to |
||||
"keep intact all notices". |
||||
|
||||
c) You must license the entire work, as a whole, under this |
||||
License to anyone who comes into possession of a copy. This |
||||
License will therefore apply, along with any applicable section 7 |
||||
additional terms, to the whole of the work, and all its parts, |
||||
regardless of how they are packaged. This License gives no |
||||
permission to license the work in any other way, but it does not |
||||
invalidate such permission if you have separately received it. |
||||
|
||||
d) If the work has interactive user interfaces, each must display |
||||
Appropriate Legal Notices; however, if the Program has interactive |
||||
interfaces that do not display Appropriate Legal Notices, your |
||||
work need not make them do so. |
||||
|
||||
A compilation of a covered work with other separate and independent |
||||
works, which are not by their nature extensions of the covered work, |
||||
and which are not combined with it such as to form a larger program, |
||||
in or on a volume of a storage or distribution medium, is called an |
||||
"aggregate" if the compilation and its resulting copyright are not |
||||
used to limit the access or legal rights of the compilation's users |
||||
beyond what the individual works permit. Inclusion of a covered work |
||||
in an aggregate does not cause this License to apply to the other |
||||
parts of the aggregate. |
||||
|
||||
6. Conveying Non-Source Forms. |
||||
|
||||
You may convey a covered work in object code form under the terms |
||||
of sections 4 and 5, provided that you also convey the |
||||
machine-readable Corresponding Source under the terms of this License, |
||||
in one of these ways: |
||||
|
||||
a) Convey the object code in, or embodied in, a physical product |
||||
(including a physical distribution medium), accompanied by the |
||||
Corresponding Source fixed on a durable physical medium |
||||
customarily used for software interchange. |
||||
|
||||
b) Convey the object code in, or embodied in, a physical product |
||||
(including a physical distribution medium), accompanied by a |
||||
written offer, valid for at least three years and valid for as |
||||
long as you offer spare parts or customer support for that product |
||||
model, to give anyone who possesses the object code either (1) a |
||||
copy of the Corresponding Source for all the software in the |
||||
product that is covered by this License, on a durable physical |
||||
medium customarily used for software interchange, for a price no |
||||
more than your reasonable cost of physically performing this |
||||
conveying of source, or (2) access to copy the |
||||
Corresponding Source from a network server at no charge. |
||||
|
||||
c) Convey individual copies of the object code with a copy of the |
||||
written offer to provide the Corresponding Source. This |
||||
alternative is allowed only occasionally and noncommercially, and |
||||
only if you received the object code with such an offer, in accord |
||||
with subsection 6b. |
||||
|
||||
d) Convey the object code by offering access from a designated |
||||
place (gratis or for a charge), and offer equivalent access to the |
||||
Corresponding Source in the same way through the same place at no |
||||
further charge. You need not require recipients to copy the |
||||
Corresponding Source along with the object code. If the place to |
||||
copy the object code is a network server, the Corresponding Source |
||||
may be on a different server (operated by you or a third party) |
||||
that supports equivalent copying facilities, provided you maintain |
||||
clear directions next to the object code saying where to find the |
||||
Corresponding Source. Regardless of what server hosts the |
||||
Corresponding Source, you remain obligated to ensure that it is |
||||
available for as long as needed to satisfy these requirements. |
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided |
||||
you inform other peers where the object code and Corresponding |
||||
Source of the work are being offered to the general public at no |
||||
charge under subsection 6d. |
||||
|
||||
A separable portion of the object code, whose source code is excluded |
||||
from the Corresponding Source as a System Library, need not be |
||||
included in conveying the object code work. |
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any |
||||
tangible personal property which is normally used for personal, family, |
||||
or household purposes, or (2) anything designed or sold for incorporation |
||||
into a dwelling. In determining whether a product is a consumer product, |
||||
doubtful cases shall be resolved in favor of coverage. For a particular |
||||
product received by a particular user, "normally used" refers to a |
||||
typical or common use of that class of product, regardless of the status |
||||
of the particular user or of the way in which the particular user |
||||
actually uses, or expects or is expected to use, the product. A product |
||||
is a consumer product regardless of whether the product has substantial |
||||
commercial, industrial or non-consumer uses, unless such uses represent |
||||
the only significant mode of use of the product. |
||||
|
||||
"Installation Information" for a User Product means any methods, |
||||
procedures, authorization keys, or other information required to install |
||||
and execute modified versions of a covered work in that User Product from |
||||
a modified version of its Corresponding Source. The information must |
||||
suffice to ensure that the continued functioning of the modified object |
||||
code is in no case prevented or interfered with solely because |
||||
modification has been made. |
||||
|
||||
If you convey an object code work under this section in, or with, or |
||||
specifically for use in, a User Product, and the conveying occurs as |
||||
part of a transaction in which the right of possession and use of the |
||||
User Product is transferred to the recipient in perpetuity or for a |
||||
fixed term (regardless of how the transaction is characterized), the |
||||
Corresponding Source conveyed under this section must be accompanied |
||||
by the Installation Information. But this requirement does not apply |
||||
if neither you nor any third party retains the ability to install |
||||
modified object code on the User Product (for example, the work has |
||||
been installed in ROM). |
||||
|
||||
The requirement to provide Installation Information does not include a |
||||
requirement to continue to provide support service, warranty, or updates |
||||
for a work that has been modified or installed by the recipient, or for |
||||
the User Product in which it has been modified or installed. Access to a |
||||
network may be denied when the modification itself materially and |
||||
adversely affects the operation of the network or violates the rules and |
||||
protocols for communication across the network. |
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, |
||||
in accord with this section must be in a format that is publicly |
||||
documented (and with an implementation available to the public in |
||||
source code form), and must require no special password or key for |
||||
unpacking, reading or copying. |
||||
|
||||
7. Additional Terms. |
||||
|
||||
"Additional permissions" are terms that supplement the terms of this |
||||
License by making exceptions from one or more of its conditions. |
||||
Additional permissions that are applicable to the entire Program shall |
||||
be treated as though they were included in this License, to the extent |
||||
that they are valid under applicable law. If additional permissions |
||||
apply only to part of the Program, that part may be used separately |
||||
under those permissions, but the entire Program remains governed by |
||||
this License without regard to the additional permissions. |
||||
|
||||
When you convey a copy of a covered work, you may at your option |
||||
remove any additional permissions from that copy, or from any part of |
||||
it. (Additional permissions may be written to require their own |
||||
removal in certain cases when you modify the work.) You may place |
||||
additional permissions on material, added by you to a covered work, |
||||
for which you have or can give appropriate copyright permission. |
||||
|
||||
Notwithstanding any other provision of this License, for material you |
||||
add to a covered work, you may (if authorized by the copyright holders of |
||||
that material) supplement the terms of this License with terms: |
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the |
||||
terms of sections 15 and 16 of this License; or |
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or |
||||
author attributions in that material or in the Appropriate Legal |
||||
Notices displayed by works containing it; or |
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or |
||||
requiring that modified versions of such material be marked in |
||||
reasonable ways as different from the original version; or |
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or |
||||
authors of the material; or |
||||
|
||||
e) Declining to grant rights under trademark law for use of some |
||||
trade names, trademarks, or service marks; or |
||||
|
||||
f) Requiring indemnification of licensors and authors of that |
||||
material by anyone who conveys the material (or modified versions of |
||||
it) with contractual assumptions of liability to the recipient, for |
||||
any liability that these contractual assumptions directly impose on |
||||
those licensors and authors. |
||||
|
||||
All other non-permissive additional terms are considered "further |
||||
restrictions" within the meaning of section 10. If the Program as you |
||||
received it, or any part of it, contains a notice stating that it is |
||||
governed by this License along with a term that is a further |
||||
restriction, you may remove that term. If a license document contains |
||||
a further restriction but permits relicensing or conveying under this |
||||
License, you may add to a covered work material governed by the terms |
||||
of that license document, provided that the further restriction does |
||||
not survive such relicensing or conveying. |
||||
|
||||
If you add terms to a covered work in accord with this section, you |
||||
must place, in the relevant source files, a statement of the |
||||
additional terms that apply to those files, or a notice indicating |
||||
where to find the applicable terms. |
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the |
||||
form of a separately written license, or stated as exceptions; |
||||
the above requirements apply either way. |
||||
|
||||
8. Termination. |
||||
|
||||
You may not propagate or modify a covered work except as expressly |
||||
provided under this License. Any attempt otherwise to propagate or |
||||
modify it is void, and will automatically terminate your rights under |
||||
this License (including any patent licenses granted under the third |
||||
paragraph of section 11). |
||||
|
||||
However, if you cease all violation of this License, then your |
||||
license from a particular copyright holder is reinstated (a) |
||||
provisionally, unless and until the copyright holder explicitly and |
||||
finally terminates your license, and (b) permanently, if the copyright |
||||
holder fails to notify you of the violation by some reasonable means |
||||
prior to 60 days after the cessation. |
||||
|
||||
Moreover, your license from a particular copyright holder is |
||||
reinstated permanently if the copyright holder notifies you of the |
||||
violation by some reasonable means, this is the first time you have |
||||
received notice of violation of this License (for any work) from that |
||||
copyright holder, and you cure the violation prior to 30 days after |
||||
your receipt of the notice. |
||||
|
||||
Termination of your rights under this section does not terminate the |
||||
licenses of parties who have received copies or rights from you under |
||||
this License. If your rights have been terminated and not permanently |
||||
reinstated, you do not qualify to receive new licenses for the same |
||||
material under section 10. |
||||
|
||||
9. Acceptance Not Required for Having Copies. |
||||
|
||||
You are not required to accept this License in order to receive or |
||||
run a copy of the Program. Ancillary propagation of a covered work |
||||
occurring solely as a consequence of using peer-to-peer transmission |
||||
to receive a copy likewise does not require acceptance. However, |
||||
nothing other than this License grants you permission to propagate or |
||||
modify any covered work. These actions infringe copyright if you do |
||||
not accept this License. Therefore, by modifying or propagating a |
||||
covered work, you indicate your acceptance of this License to do so. |
||||
|
||||
10. Automatic Licensing of Downstream Recipients. |
||||
|
||||
Each time you convey a covered work, the recipient automatically |
||||
receives a license from the original licensors, to run, modify and |
||||
propagate that work, subject to this License. You are not responsible |
||||
for enforcing compliance by third parties with this License. |
||||
|
||||
An "entity transaction" is a transaction transferring control of an |
||||
organization, or substantially all assets of one, or subdividing an |
||||
organization, or merging organizations. If propagation of a covered |
||||
work results from an entity transaction, each party to that |
||||
transaction who receives a copy of the work also receives whatever |
||||
licenses to the work the party's predecessor in interest had or could |
||||
give under the previous paragraph, plus a right to possession of the |
||||
Corresponding Source of the work from the predecessor in interest, if |
||||
the predecessor has it or can get it with reasonable efforts. |
||||
|
||||
You may not impose any further restrictions on the exercise of the |
||||
rights granted or affirmed under this License. For example, you may |
||||
not impose a license fee, royalty, or other charge for exercise of |
||||
rights granted under this License, and you may not initiate litigation |
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that |
||||
any patent claim is infringed by making, using, selling, offering for |
||||
sale, or importing the Program or any portion of it. |
||||
|
||||
11. Patents. |
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this |
||||
License of the Program or a work on which the Program is based. The |
||||
work thus licensed is called the contributor's "contributor version". |
||||
|
||||
A contributor's "essential patent claims" are all patent claims |
||||
owned or controlled by the contributor, whether already acquired or |
||||
hereafter acquired, that would be infringed by some manner, permitted |
||||
by this License, of making, using, or selling its contributor version, |
||||
but do not include claims that would be infringed only as a |
||||
consequence of further modification of the contributor version. For |
||||
purposes of this definition, "control" includes the right to grant |
||||
patent sublicenses in a manner consistent with the requirements of |
||||
this License. |
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free |
||||
patent license under the contributor's essential patent claims, to |
||||
make, use, sell, offer for sale, import and otherwise run, modify and |
||||
propagate the contents of its contributor version. |
||||
|
||||
In the following three paragraphs, a "patent license" is any express |
||||
agreement or commitment, however denominated, not to enforce a patent |
||||
(such as an express permission to practice a patent or covenant not to |
||||
sue for patent infringement). To "grant" such a patent license to a |
||||
party means to make such an agreement or commitment not to enforce a |
||||
patent against the party. |
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, |
||||
and the Corresponding Source of the work is not available for anyone |
||||
to copy, free of charge and under the terms of this License, through a |
||||
publicly available network server or other readily accessible means, |
||||
then you must either (1) cause the Corresponding Source to be so |
||||
available, or (2) arrange to deprive yourself of the benefit of the |
||||
patent license for this particular work, or (3) arrange, in a manner |
||||
consistent with the requirements of this License, to extend the patent |
||||
license to downstream recipients. "Knowingly relying" means you have |
||||
actual knowledge that, but for the patent license, your conveying the |
||||
covered work in a country, or your recipient's use of the covered work |
||||
in a country, would infringe one or more identifiable patents in that |
||||
country that you have reason to believe are valid. |
||||
|
||||
If, pursuant to or in connection with a single transaction or |
||||
arrangement, you convey, or propagate by procuring conveyance of, a |
||||
covered work, and grant a patent license to some of the parties |
||||
receiving the covered work authorizing them to use, propagate, modify |
||||
or convey a specific copy of the covered work, then the patent license |
||||
you grant is automatically extended to all recipients of the covered |
||||
work and works based on it. |
||||
|
||||
A patent license is "discriminatory" if it does not include within |
||||
the scope of its coverage, prohibits the exercise of, or is |
||||
conditioned on the non-exercise of one or more of the rights that are |
||||
specifically granted under this License. You may not convey a covered |
||||
work if you are a party to an arrangement with a third party that is |
||||
in the business of distributing software, under which you make payment |
||||
to the third party based on the extent of your activity of conveying |
||||
the work, and under which the third party grants, to any of the |
||||
parties who would receive the covered work from you, a discriminatory |
||||
patent license (a) in connection with copies of the covered work |
||||
conveyed by you (or copies made from those copies), or (b) primarily |
||||
for and in connection with specific products or compilations that |
||||
contain the covered work, unless you entered into that arrangement, |
||||
or that patent license was granted, prior to 28 March 2007. |
||||
|
||||
Nothing in this License shall be construed as excluding or limiting |
||||
any implied license or other defenses to infringement that may |
||||
otherwise be available to you under applicable patent law. |
||||
|
||||
12. No Surrender of Others' Freedom. |
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or |
||||
otherwise) that contradict the conditions of this License, they do not |
||||
excuse you from the conditions of this License. If you cannot convey a |
||||
covered work so as to satisfy simultaneously your obligations under this |
||||
License and any other pertinent obligations, then as a consequence you may |
||||
not convey it at all. For example, if you agree to terms that obligate you |
||||
to collect a royalty for further conveying from those to whom you convey |
||||
the Program, the only way you could satisfy both those terms and this |
||||
License would be to refrain entirely from conveying the Program. |
||||
|
||||
13. Use with the GNU Affero General Public License. |
||||
|
||||
Notwithstanding any other provision of this License, you have |
||||
permission to link or combine any covered work with a work licensed |
||||
under version 3 of the GNU Affero General Public License into a single |
||||
combined work, and to convey the resulting work. The terms of this |
||||
License will continue to apply to the part which is the covered work, |
||||
but the special requirements of the GNU Affero General Public License, |
||||
section 13, concerning interaction through a network will apply to the |
||||
combination as such. |
||||
|
||||
14. Revised Versions of this License. |
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of |
||||
the GNU General Public License from time to time. Such new versions will |
||||
be similar in spirit to the present version, but may differ in detail to |
||||
address new problems or concerns. |
||||
|
||||
Each version is given a distinguishing version number. If the |
||||
Program specifies that a certain numbered version of the GNU General |
||||
Public License "or any later version" applies to it, you have the |
||||
option of following the terms and conditions either of that numbered |
||||
version or of any later version published by the Free Software |
||||
Foundation. If the Program does not specify a version number of the |
||||
GNU General Public License, you may choose any version ever published |
||||
by the Free Software Foundation. |
||||
|
||||
If the Program specifies that a proxy can decide which future |
||||
versions of the GNU General Public License can be used, that proxy's |
||||
public statement of acceptance of a version permanently authorizes you |
||||
to choose that version for the Program. |
||||
|
||||
Later license versions may give you additional or different |
||||
permissions. However, no additional obligations are imposed on any |
||||
author or copyright holder as a result of your choosing to follow a |
||||
later version. |
||||
|
||||
15. Disclaimer of Warranty. |
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
||||
|
||||
16. Limitation of Liability. |
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
||||
SUCH DAMAGES. |
||||
|
||||
17. Interpretation of Sections 15 and 16. |
||||
|
||||
If the disclaimer of warranty and limitation of liability provided |
||||
above cannot be given local legal effect according to their terms, |
||||
reviewing courts shall apply local law that most closely approximates |
||||
an absolute waiver of all civil liability in connection with the |
||||
Program, unless a warranty or assumption of liability accompanies a |
||||
copy of the Program in return for a fee. |
||||
|
||||
END OF TERMS AND CONDITIONS |
||||
|
||||
How to Apply These Terms to Your New Programs |
||||
|
||||
If you develop a new program, and you want it to be of the greatest |
||||
possible use to the public, the best way to achieve this is to make it |
||||
free software which everyone can redistribute and change under these terms. |
||||
|
||||
To do so, attach the following notices to the program. It is safest |
||||
to attach them to the start of each source file to most effectively |
||||
state the exclusion of warranty; and each file should have at least |
||||
the "copyright" line and a pointer to where the full notice is found. |
||||
|
||||
<one line to give the program's name and a brief idea of what it does.> |
||||
Copyright (C) <year> <name of author> |
||||
|
||||
This program is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
Also add information on how to contact you by electronic and paper mail. |
||||
|
||||
If the program does terminal interaction, make it output a short |
||||
notice like this when it starts in an interactive mode: |
||||
|
||||
<program> Copyright (C) <year> <name of author> |
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
||||
This is free software, and you are welcome to redistribute it |
||||
under certain conditions; type `show c' for details. |
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate |
||||
parts of the General Public License. Of course, your program's commands |
||||
might be different; for a GUI interface, you would use an "about box". |
||||
|
||||
You should also get your employer (if you work as a programmer) or school, |
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. |
||||
For more information on this, and how to apply and follow the GNU GPL, see |
||||
<http://www.gnu.org/licenses/>. |
||||
|
||||
The GNU General Public License does not permit incorporating your program |
||||
into proprietary programs. If your program is a subroutine library, you |
||||
may consider it more useful to permit linking proprietary applications with |
||||
the library. If this is what you want to do, use the GNU Lesser General |
||||
Public License instead of this License. But first, please read |
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>. |
||||
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
# Go Fuck Yourself |
||||
|
||||
Offended? Go away. We don't need people who are offended because of a stranger on the internet. |
||||
Not offended? You're welcome to contribute. |
||||
|
||||
© Copyright 2015 [WTFCoC Consortium Committee](https://github.com/mniip/wtfcoc). |
||||
|
||||
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
SHELL:=/bin/bash
|
||||
LFS = lfs
|
||||
SRC = $(LFS)/sources
|
||||
PACKAGES = $(LFS)/host/03-packages.list
|
||||
PATCHES = $(LFS)/host/03-patches.list
|
||||
WGET = wget -q --show-progress --continue --directory-prefix=$(SRC)
|
||||
|
||||
build: reload provision |
||||
|
||||
boot: gui |
||||
gui: stop grub |
||||
|
||||
grub: |
||||
VAGRANT_GUI=true vagrant up --no-provision
|
||||
|
||||
scratch: destroy clean src init |
||||
|
||||
reinstall: destroy init |
||||
|
||||
reload: |
||||
vagrant reload
|
||||
|
||||
provision: |
||||
vagrant provision
|
||||
|
||||
init: |
||||
vagrant up --provision
|
||||
|
||||
install: |
||||
vagrant up --provision
|
||||
|
||||
start: |
||||
vagrant up
|
||||
|
||||
stop: |
||||
vagrant halt
|
||||
|
||||
destroy: |
||||
vagrant destroy -f
|
||||
|
||||
clean: |
||||
rm -rf $(SRC)
|
||||
|
||||
src: sources patches md5 |
||||
|
||||
sources: |
||||
mkdir -pv $(SRC)
|
||||
$(WGET) -i <(awk '{ print $$2 }' $(PACKAGES))
|
||||
|
||||
patches: |
||||
mkdir -pv $(SRC)
|
||||
$(WGET) -i <(awk '{ print $$2 }' $(PATCHES))
|
||||
|
||||
md5: sources-md5 patches-md5 |
||||
|
||||
sources-md5: |
||||
cd $(SRC) && md5sum --quiet -c <(awk '{ print $$3 " " gensub(".*/", "", "g", $$2) }' ../../$(PACKAGES))
|
||||
|
||||
patches-md5: |
||||
cd $(SRC) && md5sum --quiet -c <(awk '{ print $$3 " " gensub(".*/", "", "g", $$2) }' ../../$(PATCHES))
|
||||
|
||||
@ -0,0 +1,88 @@
@@ -0,0 +1,88 @@
|
||||
<p style="text-align: center;"> |
||||
<img src="https://linuxfromscratch.org.ru/images/lfs-logo.png"> |
||||
</p> |
||||
|
||||
----- |
||||
|
||||
This repository contains sources and scripts for building |
||||
[Linux From Scratch](http://linuxfromscratch.org/lfs/) system |
||||
**v20190308** (~9.0 RC1). |
||||
|
||||
----- |
||||
|
||||
## License |
||||
|
||||
All scenarios are distributed under the [GNU General Public License v3.](https://www.gnu.org/licenses/gpl-3.0.html) |
||||
|
||||
## Requirements |
||||
|
||||
- Vagrant with VirtualBox |
||||
- Make |
||||
|
||||
## Build |
||||
|
||||
### With two commands |
||||
|
||||
```sh |
||||
$ make |
||||
[...] |
||||
$ make boot |
||||
``` |
||||
|
||||
### Step by step |
||||
|
||||
1. `Optional` |
||||
|
||||
This repository already contains all necessary source files |
||||
but it is possible to start literally from scratch with removing archives: |
||||
|
||||
```sh |
||||
$ make clean |
||||
``` |
||||
|
||||
Download sources and check their md5 sums: |
||||
|
||||
```sh |
||||
$ make src |
||||
``` |
||||
|
||||
2. Configure host system and build LFS: |
||||
|
||||
```sh |
||||
$ make install |
||||
``` |
||||
|
||||
Building an OS can take considerable time, even more than 10 hours. |
||||
|
||||
For instance, on my system it tooks the following time: |
||||
|
||||
```sh |
||||
$ time make install |
||||
|
||||
real 681m8,127s |
||||
user 118m54,477s |
||||
sys 27m19,321s |
||||
CPU 21,46% |
||||
``` |
||||
|
||||
If the build is interrupted, the installation can be continued |
||||
with the `make` or `make build` command, which is the same thing. |
||||
In this case the packages already built will not be reassembled. |
||||
|
||||
3. Reboot the VM and load new LFS installation: |
||||
|
||||
```sh |
||||
$ make boot |
||||
``` |
||||
|
||||
This command starts VM in GUI VirtualBox mode so it is possible |
||||
to use GRUB to boot into LFS or Debian GNU/Linux. |
||||
|
||||
 |
||||
|
||||
4. Check the LFS installation. |
||||
|
||||
 |
||||
|
||||
5. Use you own Linux. |
||||
|
||||
@ -0,0 +1,97 @@
@@ -0,0 +1,97 @@
|
||||
# vi: set ft=ruby : |
||||
|
||||
# |
||||
# Copyright (C) 2020, Maxim Lihachev, <envrm@yandex.ru> |
||||
# |
||||
# This program is free software: you can redistribute it and/or modify it |
||||
# under the terms of the GNU General Public License as published by the Free |
||||
# Software Foundation, version 3. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
# |
||||
|
||||
vm_name = 'lfs' |
||||
|
||||
lfs_disk = "./#{vm_name}.vdi" |
||||
lfs_disk_size = 10_000 |
||||
|
||||
def run(script, result) |
||||
control_file = script.gsub(/^\d\d-/, '').chomp('.sh') |
||||
header = '=' * 80 |
||||
message = result.center(80, ' ').gsub(/^ | $/, '====') |
||||
|
||||
<<-SHELL |
||||
ok() { |
||||
echo "#{header}" |
||||
echo "#{message}" |
||||
echo "#{header}" |
||||
} |
||||
|
||||
if [ -f /var/#{control_file} ]; then |
||||
ok |
||||
exit 0 |
||||
fi |
||||
|
||||
/vagrant/#{script} && ok |
||||
SHELL |
||||
end |
||||
|
||||
def $stdout.write(string) |
||||
log_datas = string |
||||
timestamp = ::Time.now.strftime('[%Y-%m-%d %T] ') |
||||
|
||||
if log_datas.gsub(/\r?\n/, '') != '' |
||||
log_datas = log_datas.gsub(/^/, timestamp) |
||||
end |
||||
|
||||
super log_datas |
||||
end |
||||
|
||||
def $stderr.write(string) |
||||
log_datas = string |
||||
timestamp = ::Time.now.strftime('[%Y-%m-%d %T] ') |
||||
|
||||
if log_datas.gsub(/\r?\n/, '') != '' |
||||
log_datas = log_datas.gsub(/^/, timestamp) |
||||
end |
||||
|
||||
super log_datas |
||||
end |
||||
|
||||
Vagrant.configure('2') do |config| |
||||
config.vm.box = 'debian/buster64' |
||||
|
||||
config.vm.define vm_name |
||||
config.vm.hostname = "#{vm_name}-build-host" |
||||
|
||||
config.vm.synced_folder 'lfs/', '/vagrant', type: 'rsync' |
||||
|
||||
config.vm.provider :virtualbox do |vb| |
||||
unless File.exist?(lfs_disk) |
||||
vb.customize ['createhd', '--filename', lfs_disk, '--size', lfs_disk_size] |
||||
end |
||||
|
||||
vb.customize ['storageattach', :id, |
||||
'--storagectl', 'SATA Controller', |
||||
'--port', 1, |
||||
'--device', 0, |
||||
'--type', 'hdd', |
||||
'--medium', lfs_disk] |
||||
|
||||
vb.memory = 512 |
||||
|
||||
vb.gui = true if ENV['VAGRANT_GUI'] |
||||
end |
||||
|
||||
config.vm.provision 'shell', inline: run('01-host-init.sh', 'VAGRANT HOST IS READY FOR LFS BUILDING') |
||||
config.vm.provision 'shell', inline: run('02-host-build-tools.sh', 'BUILD TOOLS ARE CONFIGURED') |
||||
config.vm.provision 'shell', inline: run('03-lfs-prepare-chroot.sh', 'LFS CHROOT IS READY') |
||||
config.vm.provision 'shell', inline: run('04-lfs-build-packages.sh', 'LFS PACKAGES ARE INSTALLED') |
||||
config.vm.provision 'shell', inline: run('05-lfs-configuration.sh','LFS SYSTEM IS CONFIGURED') |
||||
end |
||||
|
After Width: | Height: | Size: 396 KiB |
|
After Width: | Height: | Size: 397 KiB |
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
#### 2.2. Host system requirements |
||||
|
||||
apt-get update |
||||
apt-get install -y build-essential bison gawk vim util-linux texinfo expect parted |
||||
|
||||
# Disable dash as default shell |
||||
|
||||
echo "dash dash/sh boolean false" | debconf-set-selections |
||||
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash |
||||
|
||||
# Check the host system |
||||
|
||||
sh /vagrant/utils/check-host-requirements.sh |
||||
|
||||
#### Make LFS partition |
||||
|
||||
sh /vagrant/host/02-partitions.sh |
||||
|
||||
#### Set up build environment |
||||
|
||||
sh /vagrant/host/03-packages.sh |
||||
sh /vagrant/host/04-user.sh |
||||
|
||||
date > /var/host-init |
||||
|
||||
@ -0,0 +1,82 @@
@@ -0,0 +1,82 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
#### Compile build toolkit |
||||
|
||||
source /etc/profile.d/lfs.sh |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 5.4. Compile build toolkit ====" |
||||
echo "================================================================================" |
||||
|
||||
check() { |
||||
pkg="$1" |
||||
|
||||
shift |
||||
|
||||
run "/vagrant/utils/check-${pkg}.sh $*" |
||||
} |
||||
|
||||
run() { |
||||
sudo -u lfs -H bash -c "$*" |
||||
} |
||||
|
||||
install() { |
||||
package="$2" |
||||
installation_script="${1}-${package}.sh" |
||||
|
||||
printf "#### [%s/%s] Install %-20s" "$1" "$TOOLS" "$package" |
||||
|
||||
if [ -f "${LFS}/sources/host-${package}.installed" ]; then |
||||
echo "[OK]" |
||||
else |
||||
run "/vagrant/tools/$installation_script" \ |
||||
&& run touch "$LFS/sources/host-${package}.installed" |
||||
fi |
||||
} |
||||
|
||||
TOOLS=31 |
||||
|
||||
install 01 binutils-1 |
||||
install 02 gcc-1 |
||||
install 03 linux-headers |
||||
install 04 glibc && check tools-gcc "$LFS_TGT-gcc" |
||||
install 05 libstdc++ |
||||
install 06 binutils-2 |
||||
install 07 gcc-2 && check tools-gcc cc |
||||
install 08 tcl |
||||
install 09 expect |
||||
install 10 dejagnu |
||||
install 11 m4 |
||||
install 12 ncurses |
||||
install 13 bash |
||||
install 14 bison |
||||
install 15 bzip2 |
||||
install 16 coreutils |
||||
install 17 diffutils |
||||
install 18 file |
||||
install 19 findutils |
||||
install 20 gawk |
||||
install 21 gettext |
||||
install 22 grep |
||||
install 23 gzip |
||||
install 24 make |
||||
install 25 patch |
||||
install 26 perl |
||||
install 27 python |
||||
install 28 sed |
||||
install 29 tar |
||||
install 30 texinfo |
||||
install 31 xz |
||||
|
||||
#/usr/bin/strip --strip-debug /tools/lib/* |
||||
#/usr/bin/strip --strip-unneeded /tools/{,s}bin/* |
||||
|
||||
#rm -rf /tools/{,share}/{info,man,doc} |
||||
#find /tools/{lib,libexec} -name \*.la -delete |
||||
|
||||
# chown -R root:root $LFS/tools |
||||
|
||||
date > /var/host-build-tools |
||||
|
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
#### Prepare LFS chroot |
||||
|
||||
source /etc/profile.d/lfs.sh |
||||
|
||||
run_in_chroot() { |
||||
chroot "$LFS" /tools/bin/env -i \ |
||||
HOME=/root \ |
||||
TERM="$TERM" \ |
||||
PS1='\u:\w\$ ' \ |
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ |
||||
MAKEFLAGS='-j 2' \ |
||||
/tools/bin/bash --login +h \ |
||||
-c "sh /scripts/chroot/$1" |
||||
} |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 6.2. Make virtual kernel subsystem ====" |
||||
echo "================================================================================" |
||||
|
||||
/vagrant/chroot/01-chroot-init.sh |
||||
|
||||
for d in chroot system utils; do |
||||
rm -rf "$LFS/scripts/${d}" |
||||
mkdir -pv "$LFS/scripts/${d}" |
||||
cp -rvf /vagrant/${d}/* "$LFS/scripts/${d}/" |
||||
done |
||||
|
||||
run_in_chroot 02-chroot-dirtree.sh |
||||
run_in_chroot 03-chroot-passwd.sh |
||||
|
||||
@ -0,0 +1,136 @@
@@ -0,0 +1,136 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
#### Compile LFS packages |
||||
|
||||
source /etc/profile.d/lfs.sh |
||||
|
||||
install() { |
||||
package="$2" |
||||
installation_script="${1}-${package}.sh" |
||||
|
||||
printf "#### [%s/%s] Install %-20s" "$1" "$TOOLS" "$package" |
||||
|
||||
if [ -f "${LFS}/sources/lfs-${package}.installed" ]; then |
||||
echo "[OK]" |
||||
else |
||||
run_in_chroot "/scripts/packages/$installation_script" \ |
||||
&& touch "${LFS}/sources/lfs-${package}.installed" |
||||
fi |
||||
} |
||||
|
||||
check() { |
||||
pkg="$1" |
||||
|
||||
shift |
||||
|
||||
run_in_chroot "/scripts/utils/check-${pkg}.sh $*" |
||||
} |
||||
|
||||
run_in_chroot() { |
||||
chroot "$LFS" /tools/bin/env -i \ |
||||
HOME=/root \ |
||||
TERM="$TERM" \ |
||||
PS1='\u:\w\$ ' \ |
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ |
||||
MAKEFLAGS='-j 2' \ |
||||
/tools/bin/bash --login +h \ |
||||
-c "sh $1" |
||||
} |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 6.x. Copy LFS sources ====" |
||||
echo "================================================================================" |
||||
|
||||
mkdir -pv "$LFS/sources" |
||||
cp -r /vagrant/sources/* "$LFS/sources/" |
||||
|
||||
rm -rf "$LFS/scripts/packages" |
||||
mkdir -pv "$LFS/scripts/packages" |
||||
cp -r /vagrant/packages/* "$LFS/scripts/packages/" |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 6.x. Compile LFS packages ====" |
||||
echo "================================================================================" |
||||
|
||||
# LFS Packages |
||||
|
||||
TOOLS=71 |
||||
|
||||
install 01 linux-headers |
||||
install 02 man-pages |
||||
install 03 glibc && check tools-gcc cc /lib |
||||
install 04 zlib |
||||
install 05 file |
||||
install 06 readline |
||||
install 07 m4 |
||||
install 08 bc |
||||
install 09 binutils |
||||
install 10 gmp |
||||
install 11 mpfr |
||||
install 12 mpc |
||||
install 13 shadow |
||||
install 14 gcc && check tools-gcc cc /lib |
||||
install 15 bzip2 |
||||
install 16 pkg-config |
||||
install 17 ncurses |
||||
install 18 attr |
||||
install 19 acl |
||||
install 20 libcap |
||||
install 21 sed |
||||
install 22 psmisc |
||||
install 23 iana-etc |
||||
install 24 bison |
||||
install 25 flex |
||||
install 26 grep |
||||
install 27 bash |
||||
install 28 libtool |
||||
install 29 gdbm |
||||
install 30 gperf |
||||
install 31 expat |
||||
install 32 inetutils |
||||
install 33 perl |
||||
install 34 xml-parser |
||||
install 35 intltool |
||||
install 36 autoconf |
||||
install 37 automake |
||||
install 38 xz |
||||
install 39 kmod |
||||
install 40 gettext |
||||
install 41 elfutils |
||||
install 42 libffi |
||||
install 43 openssl |
||||
install 44 python |
||||
install 45 ninja |
||||
install 46 meson |
||||
install 47 coreutils |
||||
install 48 check |
||||
install 49 diffutils |
||||
install 50 gawk |
||||
install 51 findutils |
||||
install 52 groff |
||||
install 53 grub |
||||
install 54 less |
||||
install 55 gzip |
||||
install 56 iproute2 |
||||
install 57 kbd |
||||
install 58 libpipeline |
||||
install 59 make |
||||
install 60 patch |
||||
install 61 man-db |
||||
install 62 tar |
||||
install 63 texinfo |
||||
install 64 vim |
||||
install 65 procps-ng |
||||
install 66 util-linux |
||||
install 67 e2fsprogs |
||||
install 68 sysklogd |
||||
install 69 sysvinit |
||||
install 70 eudev |
||||
install 71 lfs-bootscripts |
||||
|
||||
rm -rf /mnt/lfs/tmp/* |
||||
|
||||
date > /var/lfs-build-packages |
||||
|
||||
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
#### Configure LFS system |
||||
|
||||
source /etc/profile.d/lfs.sh |
||||
|
||||
configure() { |
||||
subsystem="$2" |
||||
script="${1}-${subsystem}.sh" |
||||
|
||||
printf "#### [%s/%s] Configure %-20s" "$1" "$STEPS" "$subsystem" |
||||
|
||||
if [ -f "${LFS}/var/lfs-${subsystem}.configured" ]; then |
||||
echo "[OK]" |
||||
else |
||||
run_in_chroot "/scripts/system/$script" \ |
||||
&& touch "${LFS}/var/lfs-${subsystem}.configured" |
||||
fi |
||||
} |
||||
|
||||
run_in_chroot() { |
||||
chroot "$LFS" /usr/bin/env -i \ |
||||
HOME=/root \ |
||||
TERM="$TERM" \ |
||||
PS1='(lfs chroot) \u:\w\$ ' \ |
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin \ |
||||
/bin/bash --login \ |
||||
-c "sh $1" |
||||
} |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 7.x. Configure LFS system ====" |
||||
echo "================================================================================" |
||||
|
||||
run_in_chroot /lib/udev/init-net-rules.sh || : |
||||
|
||||
STEPS=07 |
||||
|
||||
configure 01 network |
||||
configure 02 sysvinit |
||||
configure 03 shell |
||||
configure 04 fstab |
||||
configure 05 kernel |
||||
configure 06 lsb-release |
||||
configure 07 grub |
||||
|
||||
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
#### Prepare LFS chroot |
||||
|
||||
source /etc/profile.d/lfs.sh |
||||
|
||||
chown -R root:root "$LFS/tools" |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 6.2. Make virtual kernel subsystem ====" |
||||
echo "================================================================================" |
||||
|
||||
mkdir -pv "$LFS"/{dev,proc,sys,run} |
||||
|
||||
[ ! -c "$LFS"/dev/console ] && mknod -m 600 "$LFS"/dev/console c 5 1 |
||||
[ ! -c "$LFS"/dev/null ] && mknod -m 666 "$LFS"/dev/null c 1 3 |
||||
|
||||
mount -v --bind /dev "$LFS"/dev |
||||
|
||||
mount -vt devpts devpts "$LFS"/dev/pts -o gid=5,mode=620 |
||||
mount -vt proc proc "$LFS"/proc |
||||
mount -vt sysfs sysfs "$LFS"/sys |
||||
mount -vt tmpfs tmpfs "$LFS"/run |
||||
|
||||
if [ -h "$LFS/dev/shm" ]; then |
||||
mkdir -pv "$LFS"/$(readlink "$LFS"/dev/shm) |
||||
fi |
||||
|
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
#### Prepare LFS chroot |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 6.5. Create chroot directories ====" |
||||
echo "================================================================================" |
||||
|
||||
mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt} |
||||
mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} |
||||
|
||||
install -dv -m 0750 /root |
||||
install -dv -m 1777 /tmp /var/tmp |
||||
|
||||
mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src} |
||||
mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} |
||||
mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo} |
||||
mkdir -pv /usr/libexec |
||||
mkdir -pv /usr/{,local/}share/man/man{1..8} |
||||
|
||||
case $(uname -m) in |
||||
x86_64) mkdir -pv /lib64 ;; |
||||
esac |
||||
|
||||
mkdir -pv /var/{log,mail,spool} |
||||
|
||||
ln -svf /run /var/run |
||||
ln -svf /run/lock /var/lock |
||||
|
||||
mkdir -pv /var/{opt,cache,lib/{color,misc,locate},local} |
||||
|
||||
ln -svf /tools/bin/{bash,cat,chmod,dd,echo,ln,mkdir,pwd,rm,stty,touch} /bin |
||||
ln -svf /tools/bin/{env,install,perl,printf} /usr/bin |
||||
ln -svf /tools/lib/libgcc_s.so{,.1} /usr/lib |
||||
ln -svf /tools/lib/libstdc++.{a,so{,.6}} /usr/lib |
||||
|
||||
install -vdm755 /usr/lib/pkgconfig |
||||
|
||||
ln -svf bash /bin/sh |
||||
|
||||
ln -svf /proc/self/mounts /etc/mtab |
||||
|
||||
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
#### Set up default users and groups |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 6.6. Create /etc/passwd and /etc/group files ====" |
||||
echo "================================================================================" |
||||
|
||||
cat > /etc/passwd <<-"EOF" |
||||
root:x:0:0:root:/root:/bin/bash |
||||
bin:x:1:1:bin:/dev/null:/bin/false |
||||
daemon:x:6:6:Daemon User:/dev/null:/bin/false |
||||
messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false |
||||
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false |
||||
EOF |
||||
|
||||
cat > /etc/group <<-"EOF" |
||||
root:x:0: |
||||
bin:x:1:daemon |
||||
sys:x:2: |
||||
kmem:x:3: |
||||
tape:x:4: |
||||
tty:x:5: |
||||
daemon:x:6: |
||||
floppy:x:7: |
||||
disk:x:8: |
||||
lp:x:9: |
||||
dialout:x:10: |
||||
audio:x:11: |
||||
video:x:12: |
||||
utmp:x:13: |
||||
usb:x:14: |
||||
cdrom:x:15: |
||||
adm:x:16: |
||||
messagebus:x:18: |
||||
input:x:24: |
||||
mail:x:34: |
||||
kvm:x:61: |
||||
wheel:x:97: |
||||
nogroup:x:99: |
||||
users:x:999: |
||||
EOF |
||||
|
||||
touch /var/log/{btmp,lastlog,faillog,wtmp} |
||||
|
||||
chgrp -v utmp /var/log/lastlog |
||||
|
||||
chmod -v 664 /var/log/lastlog |
||||
chmod -v 600 /var/log/btmp |
||||
|
||||
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 2.4. Make partition ====" |
||||
echo "================================================================================" |
||||
|
||||
# /dev/sdb |
||||
DISK="/dev/$(lsblk | tail -1 | cut -d ' ' -f 1)" |
||||
|
||||
# Выход, если диск существует |
||||
grep '^/dev/[hs]d[a-z]$' <<<"$DISK" || exit 0 |
||||
|
||||
parted -a optimal "$DISK" mklabel gpt mkpart primary 0% 10240MB |
||||
|
||||
# /dev/sdb1 |
||||
PARTITION="${DISK}1" |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 2.5. Make ext4 ====" |
||||
echo "================================================================================" |
||||
|
||||
mkfs -v -t ext4 "$PARTITION" |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 2.6. Configure LFS environment variable ====" |
||||
echo "================================================================================" |
||||
|
||||
cat > /etc/profile.d/lfs.sh <<-EOF |
||||
export LFS=/mnt/lfs |
||||
export LFS_TGT="$(uname -m)-lfs-linux-gnu" |
||||
export PATH=/tools/bin:/bin:/usr/bin:/usr/sbin |
||||
EOF |
||||
|
||||
source /etc/profile.d/lfs.sh |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 2.6. LFS directory mounting ====" |
||||
echo "================================================================================" |
||||
|
||||
mkdir -pv "$LFS" |
||||
|
||||
mount -v -t ext4 "$PARTITION" "$LFS" |
||||
|
||||
grep -q "$PARTITION" /etc/fstab || echo "$PARTITION $LFS ext4 defaults 1 1" >> /etc/fstab |
||||
|
||||
@ -0,0 +1,78 @@
@@ -0,0 +1,78 @@
|
||||
Acl https://download.savannah.gnu.org//releases/acl/acl-2.2.53.tar.gz 007aabf1dbb550bcddde52a244cd1070 |
||||
Attr https://download.savannah.gnu.org//releases/attr/attr-2.4.48.tar.gz bc1e5cb5c96d99b24886f1f527d3bb3d |
||||
Autoconf https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz 50f97f4159805e374639a73e2636f22e |
||||
Automake https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.xz 53f38e7591fa57c3d2cee682be668e5b |
||||
Bash https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz 2b44b47b905be16f45709648f671820b |
||||
Bc https://ftp.gnu.org/gnu/bc/bc-1.07.1.tar.gz cda93857418655ea43590736fc3ca9fc |
||||
Binutils https://ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz 0d174cdaf85721c5723bf52355be41e6 |
||||
Bison https://ftp.gnu.org/gnu/bison/bison-3.3.2.tar.xz c9b552dee234b2f6b66e56b27e5234c9 |
||||
Bzip2 http://anduin.linuxfromscratch.org/LFS/bzip2-1.0.6.tar.gz 00b516f4704d4a7cb50a1d97e6e8e15b |
||||
Check https://github.com/libcheck/check/releases/download/0.12.0/check-0.12.0.tar.gz 31b17c6075820a434119592941186f70 |
||||
Coreutils https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz 0009a224d8e288e8ec406ef0161f9293 |
||||
DejaGNU https://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.2.tar.gz e1b07516533f351b3aba3423fafeffd6 |
||||
Diffutils https://ftp.gnu.org/gnu/diffutils/diffutils-3.7.tar.xz 4824adc0e95dbbf11dfbdfaad6a1e461 |
||||
E2fsprogs https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.45.0/e2fsprogs-1.45.0.tar.gz 641e1371dbdd118eade96bb963104f16 |
||||
Elfutils https://sourceware.org/ftp/elfutils/0.176/elfutils-0.176.tar.bz2 077e4f49320cad82bf17a997068b1db9 |
||||
Eudev https://dev.gentoo.org/~blueness/eudev/eudev-3.2.7.tar.gz c75d99910c1791dd9430d26ab76059c0 |
||||
Expat https://prdownloads.sourceforge.net/expat/expat-2.2.5.tar.bz2 789e297f547980fc9ecc036f9a070d49 |
||||
Expect https://prdownloads.sourceforge.net/expect/expect5.45.4.tar.gz 00fce8de158422f5ccd2666512329bd2 |
||||
File ftp://ftp.astron.com/pub/file/file-5.36.tar.gz 9af0eb3f5db4ae00fffc37f7b861575c |
||||
Findutils https://ftp.gnu.org/gnu/findutils/findutils-4.6.0.tar.gz 9936aa8009438ce185bea2694a997fc1 |
||||
Flex https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz 2882e3179748cc9f9c23ec593d6adc8d |
||||
GCC https://ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz 65b210b4bfe7e060051f799e0f994896 |
||||
GDBM https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz 988dc82182121c7570e0cb8b4fcd5415 |
||||
GMP https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz f58fa8001d60c4c77595fbbb62b63c1d |
||||
GRUB https://ftp.gnu.org/gnu/grub/grub-2.02.tar.xz 8a4a2a95aac551fb0fba860ceabfa1d3 |
||||
Gawk https://ftp.gnu.org/gnu/gawk/gawk-4.2.1.tar.xz 95cf553f50ec9f386b5dfcd67f30180a |
||||
Gettext https://ftp.gnu.org/gnu/gettext/gettext-0.19.8.1.tar.xz df3f5690eaa30fd228537b00cb7b7590 |
||||
Glibc https://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.xz e6c279d5b2f0736f740216f152acf974 |
||||
Gperf https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz 9e251c0a618ad0824b51117d5d9db87e |
||||
Grep https://ftp.gnu.org/gnu/grep/grep-3.3.tar.xz 05d0718a1b7cc706a4bdf8115363f1ed |
||||
Groff https://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz 08fb04335e2f5e73f23ea4c3adbf0c5f |
||||
Gzip https://ftp.gnu.org/gnu/gzip/gzip-1.10.tar.xz 691b1221694c3394f1c537df4eee39d3 |
||||
IPRoute2 https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.20.0.tar.xz f3dab4c812812bbb5873cb90f471bcbf |
||||
Iana-Etc http://anduin.linuxfromscratch.org/LFS/iana-etc-2.30.tar.bz2 3ba3afb1d1b261383d247f46cb135ee8 |
||||
Inetutils https://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.xz 87fef1fa3f603aef11c41dcc097af75e |
||||
Intltool https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz 12e517cac2b57a0121cda351570f1e63 |
||||
Kbd https://www.kernel.org/pub/linux/utils/kbd/kbd-2.0.4.tar.xz c1635a5a83b63aca7f97a3eab39ebaa6 |
||||
Kmod https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-26.tar.xz 1129c243199bdd7db01b55a61aa19601 |
||||
LFS-Bootscripts https://linuxfromscratch.org.ru/lfs/downloads/8.4/lfs-bootscripts-20180820.tar.bz2 e08811a18356eeef524b2ed333e8cb86 |
||||
Less http://www.greenwoodsoftware.com/less/less-530.tar.gz 6a39bccf420c946b0fd7ffc64961315b |
||||
Libcap https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.26.tar.xz 968ac4d42a1a71754313527be2ab5df3 |
||||
Libffi ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz 83b89587607e3eb65c70d361f13bab43 |
||||
Libpipeline https://download.savannah.gnu.org//releases/libpipeline/libpipeline-1.5.1.tar.gz 4c8fe6cd85422baafd6e060f896c61bc |
||||
Libtool https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz 1bfb9b923f2c1339b4d2ce1807064aa5 |
||||
Linux https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.0.1.tar.xz 9b668e28c76f09be1a65040ec09598a1 |
||||
M4 https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz 730bb15d96fffe47e148d1e09235af82 |
||||
MPC https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz 4125404e41e482ec68282a2e687f6c73 |
||||
MPFR http://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.xz 320fbc4463d4c8cb1e566929d8adc4f8 |
||||
Make https://ftp.gnu.org/gnu/make/make-4.2.1.tar.bz2 15b012617e7c44c0ed482721629577ac |
||||
Man-DB https://download.savannah.gnu.org//releases/man-db/man-db-2.8.5.tar.xz c5c6c3434be14a5527d43b5ad0f09a13 |
||||
Man-pages https://www.kernel.org/pub/linux/docs/man-pages/man-pages-5.00.tar.xz d3be22b49e52d93734343c0df52dad01 |
||||
Meson https://github.com/mesonbuild/meson/releases/download/0.50.0/meson-0.50.0.tar.gz 433483107fda4616eaf33de7e7083a84 |
||||
Ncurses https://ftp.gnu.org/gnu/ncurses/ncurses-6.1.tar.gz 98c889aaf8d23910d2b92d65be2e737a |
||||
Ninja https://github.com/ninja-build/ninja/archive/v1.9.0/ninja-1.9.0.tar.gz f340be768a76724b83e6daab69009902 |
||||
OpenSSH http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz c6af50b7a474d04726a5aa747a5dce8f |
||||
OpenSSL https://openssl.org/source/openssl-1.1.1b.tar.gz 4532712e7bcc9414f5bce995e4e13930 |
||||
Patch https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz 78ad9937e4caadcba1526ef1853730d5 |
||||
Perl https://www.cpan.org/src/5.0/perl-5.28.1.tar.xz fbb590c305f2f88578f448581b8cf9c4 |
||||
Pkg-config https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz f6e931e319531b736fadc017f470e68a |
||||
Procps https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-3.3.15.tar.xz 2b0717a7cb474b3d6dfdeedfbad2eccc |
||||
Psmisc https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.2.tar.xz 0524258861f00be1a02d27d39d8e5e62 |
||||
Python https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz df6ec36011808205beda239c72f947cb |
||||
Python-Documentation https://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-html.tar.bz2 107ade7bb17efd104a22b2d457f4cb67 |
||||
Readline https://ftp.gnu.org/gnu/readline/readline-8.0.tar.gz 7e6c1f16aee3244a69aba6e438295ca3 |
||||
Sed https://ftp.gnu.org/gnu/sed/sed-4.7.tar.xz 777ddfd9d71dd06711fe91f0925e1573 |
||||
Shadow https://github.com/shadow-maint/shadow/releases/download/4.6/shadow-4.6.tar.xz b491fecbf1232632c32ff8f1437fd60e |
||||
Sysklogd http://www.infodrom.org/projects/sysklogd/download/sysklogd-1.5.1.tar.gz c70599ab0d037fde724f7210c2c8d7f8 |
||||
Sysvinit https://download.savannah.gnu.org//releases/sysvinit/sysvinit-2.94.tar.xz 885ae742d51dbae8d16f535455c0240a |
||||
Tar https://ftp.gnu.org/gnu/tar/tar-1.32.tar.xz 83e38700a80a26e30b2df054e69956e5 |
||||
Tcl https://downloads.sourceforge.net/tcl/tcl8.6.9-src.tar.gz aa0a121d95a0e7b73a036f26028538d4 |
||||
Texinfo https://ftp.gnu.org/gnu/texinfo/texinfo-6.6.tar.xz 5231da3e6aa106cd0532b8609e5b3702 |
||||
Time-Zone-Data https://www.iana.org/time-zones/repository/releases/tzdata2018i.tar.gz b3f0a1a789480a036e58466cd0702477 |
||||
Udev-lfs-Tarball http://anduin.linuxfromscratch.org/LFS/udev-lfs-20171102.tar.bz2 d92afb0c6e8e616792068ee4737b0d24 |
||||
Util-linux https://www.kernel.org/pub/linux/utils/util-linux/v2.33/util-linux-2.33.1.tar.xz 6fcfea2043b5ac188fd3eed56aeb5d90 |
||||
Vim ftp://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2 1739a1df312305155285f0cfa6118294 |
||||
XML::Parser https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz af4813fe3952362451201ced6fbce379 |
||||
Xz-Utils https://tukaani.org/xz/xz-5.2.4.tar.xz 003e4d0b1b1899fc6e3000b24feddf7c |
||||
Zlib https://zlib.net/zlib-1.2.11.tar.xz 85adef240c5f370b308da8c938951a68 |
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
source /etc/profile.d/lfs.sh |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 3.1. Make package directory ====" |
||||
echo "================================================================================" |
||||
|
||||
mkdir -pv "$LFS/sources" |
||||
|
||||
# Sticky-bit |
||||
chmod -v a+wt "$LFS/sources" |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 3.2-3. Download base packages and patches ====" |
||||
echo "================================================================================" |
||||
|
||||
cp -rv /vagrant/sources/* "$LFS/sources/" |
||||
|
||||
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
Bzip2 https://linuxfromscratch.org.ru/patches/lfs/8.4/bzip2-1.0.6-install_docs-1.patch 6a5ac7e89b791aae556de0f745916f7f |
||||
Coreutils http://www.linuxfromscratch.org/patches/lfs/9.0-rc1/coreutils-8.31-i18n-1.patch a9404fb575dfd5514f3c8f4120f9ca7d |
||||
Glibc https://linuxfromscratch.org.ru/patches/lfs/8.4/glibc-2.29-fhs-1.patch 9a5997c3452909b1769918c759eff8a2 |
||||
Kbd https://linuxfromscratch.org.ru/patches/lfs/8.4/kbd-2.0.4-backspace-1.patch f75cca16a38da6caa7d52151f7136895 |
||||
OpenSSH-Patch http://www.linuxfromscratch.org/patches/blfs/8.4/openssh-7.9p1-security_fix-1.patch f003bdebcaab3ed8095d08fa1543848e |
||||
Sysvinit http://www.linuxfromscratch.org/patches/downloads/sysvinit/sysvinit-2.94-consolidated-4.patch 4900322141d493e74020c9cf437b2cdc |
||||
@ -0,0 +1,59 @@
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash |
||||
|
||||
source /etc/profile.d/lfs.sh |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 4.2. Make build tools directory ====" |
||||
echo "================================================================================" |
||||
|
||||
mkdir -pv "$LFS/tools" |
||||
ln -sv "$LFS/tools" / |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 4.3. Make LFS user ====" |
||||
echo "================================================================================" |
||||
|
||||
# Выход, если пользователь существует |
||||
id -u lfs 2>/dev/null >/dev/null && exit 0 |
||||
|
||||
groupadd lfs |
||||
useradd -s /bin/bash -g lfs -m -k /dev/null lfs |
||||
|
||||
cp -rv /home/vagrant/.ssh /home/lfs |
||||
|
||||
chown -vR lfs:lfs "$LFS" |
||||
chown -vR lfs:lfs /home/lfs/.ssh |
||||
|
||||
echo "lfs ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/lfs |
||||
chmod -v 440 /etc/sudoers.d/lfs |
||||
|
||||
echo "================================================================================" |
||||
echo "==== 4.4. Configure the environment ====" |
||||
echo "================================================================================" |
||||
|
||||
echo "exec env -i HOME=/home/lfs TERM=xterm-256color PS1='\u:\w\$ ' /bin/bash" > /home/lfs/.bash_profile |
||||
|
||||
cat > /root/.bashrc <<-EOF |
||||
LFS="$LFS" |
||||
LFS_TGT="$(uname -m)-lfs-linux-gnu" |
||||
PATH=/tools/bin:/bin:/usr/bin:/usr/sbin |
||||
|
||||
export LFS LC_ALL LFS_TGT PATH MAKEFLAGS |
||||
EOF |
||||
|
||||
cat > /home/lfs/.bashrc <<-EOF |
||||
set +h |
||||
umask 022 |
||||
|
||||
LFS="$LFS" |
||||
LC_ALL=POSIX |
||||
LFS_TGT="$(uname -m)-lfs-linux-gnu" |
||||
PATH=/tools/bin:/bin:/usr/bin |
||||
MAKEFLAGS='-j 2' |
||||
|
||||
export LFS LC_ALL LFS_TGT PATH MAKEFLAGS |
||||
EOF |
||||
|
||||
chown -v lfs:lfs /home/lfs/.bash_profile |
||||
chown -v lfs:lfs /home/lfs/.bashrc |
||||
|
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash |
||||
|
||||
#### linux headers |
||||
|
||||
cd /sources |
||||
|
||||
tar -xJf linux-5.0.1.tar.xz |
||||
|
||||
cd linux-5.0.1 |
||||
|
||||
make mrproper |
||||
|
||||
make INSTALL_HDR_PATH=dest headers_install |
||||
|
||||
find dest/include \( -name .install -o -name ..install.cmd \) -delete |
||||
|
||||
cp -rv dest/include/* /usr/include |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf linux-5.0.1 |
||||
|
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash |
||||
|
||||
#### man pages |
||||
|
||||
cd /sources |
||||
|
||||
tar -xJf man-pages-5.00.tar.xz |
||||
|
||||
cd man-pages-5.00 |
||||
|
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf man-pages-5.00 |
||||
|
||||
@ -0,0 +1,163 @@
@@ -0,0 +1,163 @@
|
||||
#!/bin/bash |
||||
|
||||
#### glibc |
||||
|
||||
cd /sources |
||||
|
||||
tar -xJf glibc-2.29.tar.xz |
||||
|
||||
cd glibc-2.29 |
||||
|
||||
patch -Np1 -i ../glibc-2.29-fhs-1.patch |
||||
|
||||
ln -sfv /tools/lib/gcc /usr/lib |
||||
|
||||
case $(uname -m) in |
||||
i?86) GCC_INCDIR=/usr/lib/gcc/$(uname -m)-pc-linux-gnu/8.3.0/include |
||||
ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3 |
||||
;; |
||||
|
||||
x86_64) GCC_INCDIR=/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include |
||||
ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64 |
||||
ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 |
||||
;; |
||||
esac |
||||
|
||||
rm -f /usr/include/limits.h |
||||
|
||||
mkdir -pv build; cd build |
||||
|
||||
CC="gcc -isystem $GCC_INCDIR -isystem /usr/include" \ |
||||
../configure --prefix=/usr \ |
||||
--disable-werror \ |
||||
--enable-kernel=3.2 \ |
||||
--enable-stack-protector=strong \ |
||||
libc_cv_slibdir=/lib |
||||
|
||||
unset GCC_INCDIR |
||||
|
||||
make |
||||
|
||||
case $(uname -m) in |
||||
i?86) ln -sfnv "$PWD/elf/ld-linux.so.2" /lib ;; |
||||
x86_64) ln -sfnv "$PWD/elf/ld-linux-x86-64.so.2" /lib ;; |
||||
esac |
||||
|
||||
make check |
||||
|
||||
touch /etc/ld.so.conf |
||||
|
||||
sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile |
||||
|
||||
make install |
||||
|
||||
cp -v ../nscd/nscd.conf /etc/nscd.conf |
||||
|
||||
mkdir -pv /var/cache/nscd |
||||
|
||||
#### LOCALES |
||||
|
||||
mkdir -pv /usr/lib/locale |
||||
|
||||
localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true |
||||
localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8 |
||||
localedef -i de_DE -f ISO-8859-1 de_DE |
||||
localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro |
||||
localedef -i de_DE -f UTF-8 de_DE.UTF-8 |
||||
localedef -i el_GR -f ISO-8859-7 el_GR |
||||
localedef -i en_GB -f UTF-8 en_GB.UTF-8 |
||||
localedef -i en_HK -f ISO-8859-1 en_HK |
||||
localedef -i en_PH -f ISO-8859-1 en_PH |
||||
localedef -i en_US -f ISO-8859-1 en_US |
||||
localedef -i en_US -f UTF-8 en_US.UTF-8 |
||||
localedef -i es_MX -f ISO-8859-1 es_MX |
||||
localedef -i fa_IR -f UTF-8 fa_IR |
||||
localedef -i fr_FR -f ISO-8859-1 fr_FR |
||||
localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro |
||||
localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 |
||||
localedef -i it_IT -f ISO-8859-1 it_IT |
||||
localedef -i it_IT -f UTF-8 it_IT.UTF-8 |
||||
localedef -i ja_JP -f EUC-JP ja_JP |
||||
localedef -i ja_JP -f SHIFT_JIS ja_JP.SIJS 2> /dev/null || true |
||||
localedef -i ja_JP -f UTF-8 ja_JP.UTF-8 |
||||
localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R |
||||
localedef -i ru_RU -f UTF-8 ru_RU.UTF-8 |
||||
localedef -i tr_TR -f UTF-8 tr_TR.UTF-8 |
||||
localedef -i zh_CN -f GB18030 zh_CN.GB18030 |
||||
localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS |
||||
|
||||
make localedata/install-locales |
||||
|
||||
#### NETWORK |
||||
|
||||
cat > /etc/nsswitch.conf <<-"EOF" |
||||
# Begin /etc/nsswitch.conf |
||||
|
||||
passwd: files |
||||
group: files |
||||
shadow: files |
||||
|
||||
hosts: files dns |
||||
networks: files |
||||
|
||||
protocols: files |
||||
services: files |
||||
ethers: files |
||||
rpc: files |
||||
|
||||
# End /etc/nsswitch.conf |
||||
EOF |
||||
|
||||
#### TIME ZONE |
||||
|
||||
tar -xf ../../tzdata2018i.tar.gz |
||||
|
||||
ZONEINFO=/usr/share/zoneinfo |
||||
|
||||
mkdir -pv "$ZONEINFO"/{posix,right} |
||||
|
||||
for tz in etcetera southamerica northamerica europe africa antarctica \ |
||||
asia australasia backward pacificnew systemv; do |
||||
zic -L /dev/null -d "$ZONEINFO" ${tz} |
||||
zic -L /dev/null -d "$ZONEINFO"/posix ${tz} |
||||
zic -L leapseconds -d "$ZONEINFO"/right ${tz} |
||||
done |
||||
|
||||
cp -v zone.tab zone1970.tab iso3166.tab "$ZONEINFO" |
||||
|
||||
zic -d "$ZONEINFO -p America/New_York" |
||||
|
||||
unset ZONEINFO |
||||
|
||||
cp -v /usr/share/zoneinfo/Europe/Moscow /etc/localtime |
||||
|
||||
#### LD |
||||
|
||||
cat > /etc/ld.so.conf <<-"EOF" |
||||
# Begin /etc/ld.so.conf |
||||
/usr/local/lib |
||||
/opt/lib |
||||
|
||||
# Add an include directory |
||||
include /etc/ld.so.conf.d/*.conf |
||||
EOF |
||||
|
||||
mkdir -pv /etc/ld.so.conf.d |
||||
|
||||
#### CONFIGURE BUILD TOOLS |
||||
|
||||
mv -v /tools/bin/{ld,ld-old} |
||||
mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old} |
||||
mv -v /tools/bin/{ld-new,ld} |
||||
ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld |
||||
|
||||
gcc -dumpspecs \ |
||||
| sed -e 's@/tools@@g' \ |
||||
-e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ |
||||
-e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \ |
||||
"$(dirname $(gcc --print-libgcc-file-name))/specs" |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf glibc-2.29 |
||||
|
||||
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash |
||||
|
||||
#### zlib |
||||
|
||||
cd /sources |
||||
|
||||
tar -xJf zlib-1.2.11.tar.xz |
||||
|
||||
cd zlib-1.2.11 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
mv -v /usr/lib/libz.so.* /lib |
||||
ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf zlib-1.2.11 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### file |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf file-5.36.tar.gz |
||||
|
||||
cd file-5.36 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf file-5.36 |
||||
|
||||
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash |
||||
|
||||
#### readline |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf readline-8.0.tar.gz |
||||
|
||||
cd readline-8.0 |
||||
|
||||
sed -i '/MV.*old/d' Makefile.in |
||||
sed -i '/{OLDSUFF}/c:' support/shlib-install |
||||
|
||||
./configure --prefix=/usr \ |
||||
--disable-static \ |
||||
--docdir=/usr/share/doc/readline-8.0 |
||||
|
||||
make SHLIB_LIBS="-L/tools/lib -lncursesw" |
||||
make SHLIB_LIBS="-L/tools/lib -lncurses" install |
||||
|
||||
mv -fv /usr/lib/lib{readline,history}.so.* /lib |
||||
|
||||
chmod -v u+w /lib/lib{readline,history}.so.* |
||||
|
||||
ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so |
||||
ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf readline-8.0 |
||||
|
||||
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash |
||||
|
||||
#### m4 |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf m4-1.4.18.tar.xz |
||||
|
||||
cd m4-1.4.18 |
||||
|
||||
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c |
||||
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf m4-1.4.18 |
||||
|
||||
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash |
||||
|
||||
#### bc |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf bc-1.07.1.tar.gz |
||||
|
||||
cd bc-1.07.1 |
||||
|
||||
cat > bc/fix-libmath_h <<-"EOF" |
||||
#! /bin/bash |
||||
sed -e '1 s/^/{"/' \ |
||||
-e 's/$/",/' \ |
||||
-e '2,$ s/^/"/' \ |
||||
-e '$ d' \ |
||||
-i libmath.h |
||||
|
||||
sed -e '$ s/$/0}/' \ |
||||
-i libmath.h |
||||
EOF |
||||
|
||||
ln -sfv /tools/lib/libncursesw.so.6 /usr/lib/libncursesw.so.6 |
||||
ln -sfv libncursesw.so.6 /usr/lib/libncurses.so |
||||
|
||||
sed -i -e '/flex/s/as_fn_error/: ;; # &/' configure |
||||
|
||||
./configure --prefix=/usr \ |
||||
--with-readline \ |
||||
--mandir=/usr/share/man \ |
||||
--infodir=/usr/share/info |
||||
|
||||
make |
||||
|
||||
echo "quit" | ./bc/bc -l Test/checklib.b |
||||
|
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf bc-1.07.1 |
||||
|
||||
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash |
||||
|
||||
#### binutils |
||||
|
||||
cd /sources |
||||
|
||||
tar -xJf binutils-2.32.tar.xz |
||||
|
||||
cd binutils-2.32 |
||||
|
||||
expect -c "spawn ls" || exit 1 |
||||
|
||||
mkdir -pv build; cd build |
||||
|
||||
../configure --prefix=/usr \ |
||||
--enable-gold \ |
||||
--enable-ld=default \ |
||||
--enable-plugins \ |
||||
--enable-shared \ |
||||
--disable-werror \ |
||||
--enable-64-bit-bfd \ |
||||
--with-system-zlib |
||||
|
||||
make tooldir=/usr |
||||
make -k check |
||||
make tooldir=/usr install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf binutils-2.32 |
||||
|
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash |
||||
|
||||
#### gmp |
||||
|
||||
cd /sources |
||||
|
||||
tar -xJf gmp-6.1.2.tar.xz |
||||
|
||||
cd gmp-6.1.2 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--enable-cxx \ |
||||
--disable-static \ |
||||
--docdir=/usr/share/doc/gmp-6.1.2 |
||||
|
||||
make |
||||
make html |
||||
make check 2>&1 | tee gmp-check-log |
||||
|
||||
awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log |
||||
|
||||
make install |
||||
make install-html |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf gmp-6.1.2 |
||||
|
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash |
||||
|
||||
#### mpfr |
||||
|
||||
cd /sources |
||||
|
||||
tar -xJf mpfr-4.0.2.tar.xz |
||||
|
||||
cd mpfr-4.0.2 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--disable-static \ |
||||
--enable-thread-safe \ |
||||
--docdir=/usr/share/doc/mpfr-4.0.2 |
||||
|
||||
make |
||||
make html |
||||
make check |
||||
make install |
||||
make install-html |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf mpfr-4.0.2 |
||||
|
||||
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash |
||||
|
||||
#### mpc |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf mpc-1.1.0.tar.gz |
||||
|
||||
cd mpc-1.1.0 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--disable-static \ |
||||
--docdir=/usr/share/doc/mpc-1.1.0 |
||||
|
||||
make |
||||
make html |
||||
make check |
||||
make install |
||||
make install-html |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf mpc-1.1.0 |
||||
|
||||
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash |
||||
|
||||
#### shadow |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf shadow-4.6.tar.xz |
||||
|
||||
cd shadow-4.6 |
||||
|
||||
sed -i 's/groups$(EXEEXT) //' src/Makefile.in |
||||
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; |
||||
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; |
||||
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \; |
||||
|
||||
sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \ |
||||
-e 's@/var/spool/mail@/var/mail@' etc/login.defs |
||||
|
||||
sed -i 's/1000/999/' etc/useradd |
||||
|
||||
./configure --sysconfdir=/etc --with-group-name-max-length=32 |
||||
|
||||
make |
||||
make install |
||||
mv -v /usr/bin/passwd /bin |
||||
|
||||
pwconv |
||||
grpconv |
||||
|
||||
sed -i 's/yes/no/' /etc/default/useradd |
||||
|
||||
passwd -d root |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf shadow-4.6 |
||||
|
||||
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash |
||||
|
||||
#### gcc |
||||
|
||||
cd /sources |
||||
|
||||
tar -xJf gcc-8.3.0.tar.xz |
||||
|
||||
cd gcc-8.3.0 |
||||
|
||||
case $(uname -m) in |
||||
x86_64) sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64;; |
||||
esac |
||||
|
||||
rm -f /usr/lib/gcc |
||||
|
||||
mkdir -pv build; cd build |
||||
|
||||
SED=sed \ |
||||
../configure \ |
||||
--prefix=/usr \ |
||||
--enable-languages=c,c++ \ |
||||
--disable-multilib \ |
||||
--disable-bootstrap \ |
||||
--disable-libmpx \ |
||||
--with-system-zlib |
||||
|
||||
make |
||||
|
||||
ulimit -s 32768 |
||||
|
||||
rm ../gcc/testsuite/g++.dg/pr83239.C |
||||
|
||||
chown -R nobody . |
||||
|
||||
su nobody -s /bin/bash -c "PATH=$PATH make -k check" |
||||
|
||||
../contrib/test_summary | grep -A7 Summ |
||||
|
||||
make install |
||||
|
||||
ln -svf ../usr/bin/cpp /lib |
||||
ln -svf gcc /usr/bin/cc |
||||
|
||||
install -v -dm755 /usr/lib/bfd-plugins |
||||
ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/8.3.0/liblto_plugin.so /usr/lib/bfd-plugins/ |
||||
|
||||
mkdir -pv /usr/share/gdb/auto-load/usr/lib |
||||
mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf gcc-8.3.0 |
||||
|
||||
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash |
||||
|
||||
#### bzip2 |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf bzip2-1.0.6.tar.gz |
||||
|
||||
cd bzip2-1.0.6 |
||||
|
||||
patch -Np1 -i ../bzip2-1.0.6-install_docs-1.patch |
||||
|
||||
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile |
||||
sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile |
||||
|
||||
make -f Makefile-libbz2_so |
||||
make clean |
||||
|
||||
make |
||||
|
||||
make PREFIX=/usr install |
||||
|
||||
cp -v bzip2-shared /bin/bzip2 |
||||
cp -av libbz2.so* /lib |
||||
ln -svf ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so |
||||
rm -vf /usr/bin/{bunzip2,bzcat,bzip2} |
||||
ln -svf bzip2 /bin/bunzip2 |
||||
ln -svf bzip2 /bin/bzcat |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf bzip2-1.0.6 |
||||
|
||||
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash |
||||
|
||||
#### pkg-config |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf pkg-config-0.29.2.tar.gz |
||||
|
||||
cd pkg-config-0.29.2 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--with-internal-glib \ |
||||
--disable-host-tool \ |
||||
--docdir=/usr/share/doc/pkg-config-0.29.2 |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf pkg-config-0.29.2 |
||||
|
||||
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash |
||||
|
||||
#### ncurses |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf ncurses-6.1.tar.gz |
||||
|
||||
cd ncurses-6.1 |
||||
|
||||
sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in |
||||
|
||||
./configure --prefix=/usr \ |
||||
--mandir=/usr/share/man \ |
||||
--with-shared \ |
||||
--without-debug \ |
||||
--without-normal \ |
||||
--enable-pc-files \ |
||||
--enable-widec |
||||
|
||||
make |
||||
make install |
||||
|
||||
mv -v /usr/lib/libncursesw.so.6* /lib |
||||
ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so |
||||
|
||||
for lib in ncurses form panel menu ; do |
||||
rm -vf /usr/lib/lib${lib}.so |
||||
echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so |
||||
ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc |
||||
done |
||||
|
||||
rm -vf /usr/lib/libcursesw.so |
||||
echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so |
||||
ln -sfv libncurses.so /usr/lib/libcurses.so |
||||
|
||||
mkdir -v /usr/share/doc/ncurses-6.1 |
||||
cp -v -R doc/* /usr/share/doc/ncurses-6.1 |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf ncurses-6.1 |
||||
|
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash |
||||
|
||||
#### attr |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf attr-2.4.48.tar.gz |
||||
|
||||
cd attr-2.4.48 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--bindir=/bin \ |
||||
--disable-static \ |
||||
--sysconfdir=/etc \ |
||||
--docdir=/usr/share/doc/attr-2.4.48 |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
mv -v /usr/lib/libattr.so.* /lib |
||||
ln -sfv ../../lib/"$(readlink /usr/lib/libattr.so)" /usr/lib/libattr.so |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf attr-2.4.48 |
||||
|
||||
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash |
||||
|
||||
#### acl |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf acl-2.2.53.tar.gz |
||||
|
||||
cd acl-2.2.53 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--bindir=/bin \ |
||||
--disable-static \ |
||||
--libexecdir=/usr/lib \ |
||||
--docdir=/usr/share/doc/acl-2.2.53 |
||||
|
||||
make |
||||
make install |
||||
|
||||
mv -v /usr/lib/libacl.so.* /lib |
||||
ln -sfv ../../lib/"$(readlink /usr/lib/libacl.so)" /usr/lib/libacl.so |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf acl-2.2.53 |
||||
|
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash |
||||
|
||||
#### libcap |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf libcap-2.26.tar.xz |
||||
|
||||
cd libcap-2.26 |
||||
|
||||
sed -i '/install.*STALIBNAME/d' libcap/Makefile |
||||
|
||||
make |
||||
|
||||
make RAISE_SETFCAP=no lib=lib prefix=/usr install |
||||
|
||||
chmod -v 755 /usr/lib/libcap.so.2.26 |
||||
|
||||
mv -v /usr/lib/libcap.so.* /lib |
||||
ln -sfv ../../lib/"$(readlink /usr/lib/libcap.so)" /usr/lib/libcap.so |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf libcap-2.26 |
||||
|
||||
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash |
||||
|
||||
#### sed |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf sed-4.7.tar.xz |
||||
|
||||
cd sed-4.7 |
||||
|
||||
sed -i 's/usr/tools/' build-aux/help2man |
||||
sed -i 's/testsuite.panic-tests.sh//' Makefile.in |
||||
|
||||
./configure --prefix=/usr --bindir=/bin |
||||
|
||||
make |
||||
make html |
||||
|
||||
make check |
||||
|
||||
make install |
||||
|
||||
install -d -m755 /usr/share/doc/sed-4.7 |
||||
install -m644 doc/sed.html /usr/share/doc/sed-4.7 |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf sed-4.7 |
||||
|
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash |
||||
|
||||
#### psmisc |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf psmisc-23.2.tar.xz |
||||
|
||||
cd psmisc-23.2 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make install |
||||
|
||||
mv -v /usr/bin/fuser /bin |
||||
mv -v /usr/bin/killall /bin |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf psmisc-23.2 |
||||
|
||||
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash |
||||
|
||||
#### iana-etc |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf iana-etc-2.30.tar.bz2 |
||||
|
||||
cd iana-etc-2.30 |
||||
|
||||
make |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf iana-etc-2.30 |
||||
|
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
#### bison |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf bison-3.3.2.tar.xz |
||||
|
||||
cd bison-3.3.2 |
||||
|
||||
./configure --prefix=/usr --docdir=/usr/share/doc/bison-3.3.2 |
||||
|
||||
make |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf bison-3.3.2 |
||||
|
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash |
||||
|
||||
#### flex |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf flex-2.6.4.tar.gz |
||||
|
||||
cd flex-2.6.4 |
||||
|
||||
sed -i "/math.h/a #include <malloc.h>" src/flexdef.h |
||||
|
||||
HELP2MAN=/tools/bin/true \ |
||||
./configure --prefix=/usr --docdir=/usr/share/doc/flex-2.6.4 |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
ln -svf flex /usr/bin/lex |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf flex-2.6.4 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### grep |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf grep-3.3.tar.xz |
||||
|
||||
cd grep-3.3 |
||||
|
||||
./configure --prefix=/usr --bindir=/bin |
||||
|
||||
make |
||||
make -k check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf grep-3.3 |
||||
|
||||
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash |
||||
|
||||
#### bash |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf bash-5.0.tar.gz |
||||
|
||||
cd bash-5.0 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--docdir=/usr/share/doc/bash-5.0 \ |
||||
--without-bash-malloc \ |
||||
--with-installed-readline |
||||
|
||||
make |
||||
|
||||
chown -Rv nobody . |
||||
|
||||
su nobody -s /bin/bash -c "PATH=$PATH HOME=/home make tests" |
||||
|
||||
make install |
||||
|
||||
mv -vf /usr/bin/bash /bin |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf bash-5.0 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### libtool |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf libtool-2.4.6.tar.xz |
||||
|
||||
cd libtool-2.4.6 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf libtool-2.4.6 |
||||
|
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash |
||||
|
||||
#### gdbm |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf gdbm-1.18.1.tar.gz |
||||
|
||||
cd gdbm-1.18.1 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--disable-static \ |
||||
--enable-libgdbm-compat |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf gdbm-1.18.1 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### gperf |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf gperf-3.1.tar.gz |
||||
|
||||
cd gperf-3.1 |
||||
|
||||
./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.1 |
||||
|
||||
make |
||||
make -j1 check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf gperf-3.1 |
||||
|
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash |
||||
|
||||
#### expat |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf expat-2.2.5.tar.bz2 |
||||
|
||||
cd expat-2.2.5 |
||||
|
||||
sed -i 's|usr/bin/env |bin/|' run.sh.in |
||||
|
||||
./configure --prefix=/usr \ |
||||
--disable-static \ |
||||
--docdir=/usr/share/doc/expat-2.2.5 |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
install -v -dm755 /usr/share/doc/expat-2.2.5 |
||||
install -v -m644 doc/*.{html,png,css} /usr/share/doc/expat-2.2.5 |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf expat-2.2.5 |
||||
|
||||
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash |
||||
|
||||
#### inetutils |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf inetutils-1.9.4.tar.xz |
||||
|
||||
cd inetutils-1.9.4 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--localstatedir=/var \ |
||||
--disable-logger \ |
||||
--disable-whois \ |
||||
--disable-rcp \ |
||||
--disable-rexec \ |
||||
--disable-rlogin \ |
||||
--disable-rsh \ |
||||
--disable-servers |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
mv -v /usr/bin/{hostname,ping,ping6,traceroute} /bin |
||||
mv -v /usr/bin/ifconfig /sbin |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf inetutils-1.9.4 |
||||
|
||||
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash |
||||
|
||||
#### perl |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf perl-5.28.1.tar.xz |
||||
|
||||
cd perl-5.28.1 |
||||
|
||||
echo "127.0.0.1 localhost $(hostname)" > /etc/hosts |
||||
|
||||
export BUILD_ZLIB=False |
||||
export BUILD_BZIP2=0 |
||||
|
||||
sh Configure -des -Dprefix=/usr \ |
||||
-Dvendorprefix=/usr \ |
||||
-Dman1dir=/usr/share/man/man1 \ |
||||
-Dman3dir=/usr/share/man/man3 \ |
||||
-Dpager="/usr/bin/less -isR" \ |
||||
-Duseshrplib \ |
||||
-Dusethreads |
||||
|
||||
make |
||||
make -k test |
||||
make install |
||||
|
||||
[ -f /usr/bin/perl5.28.1 ] && ln -sfv perl5.28.1 /usr/bin/perl |
||||
|
||||
unset BUILD_ZLIB BUILD_BZIP2 |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf perl-5.28.1 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### xml-parser |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf XML-Parser-2.44.tar.gz |
||||
|
||||
cd XML-Parser-2.44 |
||||
|
||||
perl Makefile.PL |
||||
|
||||
make |
||||
make test |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf XML-Parser-2.44 |
||||
|
||||
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash |
||||
|
||||
#### intltool |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf intltool-0.51.0.tar.gz |
||||
|
||||
cd intltool-0.51.0 |
||||
|
||||
sed -i 's:\\\${:\\\$\\{:' intltool-update.in |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
install -v -Dm644 doc/I18N-HOWTO /usr/share/doc/intltool-0.51.0/I18N-HOWTO |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf intltool-0.51.0 |
||||
|
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash |
||||
|
||||
#### autoconf |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf autoconf-2.69.tar.xz |
||||
|
||||
cd autoconf-2.69 |
||||
|
||||
sed '361 s/{/\\{/' -i bin/autoscan.in |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf autoconf-2.69 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### automake |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf automake-1.16.1.tar.xz |
||||
|
||||
cd automake-1.16.1 |
||||
|
||||
./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16.1 |
||||
|
||||
make |
||||
make -j4 check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf automake-1.16.1 |
||||
|
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash |
||||
|
||||
#### xz |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf xz-5.2.4.tar.xz |
||||
|
||||
cd xz-5.2.4 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--disable-static \ |
||||
--docdir=/usr/share/doc/xz-5.2.4 |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
mv -vf /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin |
||||
mv -vf /usr/lib/liblzma.so.* /lib |
||||
|
||||
ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf xz-5.2.4 |
||||
|
||||
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash |
||||
|
||||
#### kmod |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf kmod-26.tar.xz |
||||
|
||||
cd kmod-26 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--bindir=/bin \ |
||||
--sysconfdir=/etc \ |
||||
--with-rootlibdir=/lib \ |
||||
--with-xz \ |
||||
--with-zlib |
||||
|
||||
make |
||||
make install |
||||
|
||||
for target in depmod insmod lsmod modinfo modprobe rmmod; do |
||||
ln -sfv ../bin/kmod "/sbin/$target" |
||||
done |
||||
|
||||
ln -sfv kmod /bin/lsmod |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf kmod-26 |
||||
|
||||
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash |
||||
|
||||
#### gettext |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf gettext-0.19.8.1.tar.xz |
||||
|
||||
cd gettext-0.19.8.1 |
||||
|
||||
sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in && |
||||
sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in |
||||
|
||||
sed -e '/AppData/{N;N;p;s/\.appdata\./.metainfo./}' -i gettext-tools/its/appdata.loc |
||||
|
||||
./configure --prefix=/usr \ |
||||
--disable-static \ |
||||
--docdir=/usr/share/doc/gettext-0.19.8.1 |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
chmod -v 0755 /usr/lib/preloadable_libintl.so |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf gettext-0.19.8.1 |
||||
|
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash |
||||
|
||||
#### elfutils |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf elfutils-0.176.tar.bz2 |
||||
|
||||
cd elfutils-0.176 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make -C libelf install |
||||
|
||||
install -vm644 config/libelf.pc /usr/lib/pkgconfig |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf elfutils-0.176 |
||||
|
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash |
||||
|
||||
#### libffi |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf libffi-3.2.1.tar.gz |
||||
|
||||
cd libffi-3.2.1 |
||||
|
||||
sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \ |
||||
-i include/Makefile.in |
||||
|
||||
sed -e '/^includedir/ s/=.*$/=@includedir@/' \ |
||||
-e 's/^Cflags: -I${includedir}/Cflags:/' \ |
||||
-i libffi.pc.in |
||||
|
||||
./configure --prefix=/usr --disable-static --with-gcc-arch=native |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf libffi-3.2.1 |
||||
|
||||
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash |
||||
|
||||
#### openssl |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf openssl-1.1.1b.tar.gz |
||||
|
||||
cd openssl-1.1.1b |
||||
|
||||
./config --prefix=/usr \ |
||||
--openssldir=/etc/ssl \ |
||||
--libdir=lib \ |
||||
shared \ |
||||
zlib-dynamic |
||||
|
||||
make |
||||
make test |
||||
|
||||
sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile |
||||
make MANSUFFIX=ssl install |
||||
|
||||
mv -v /usr/share/doc/openssl /usr/share/doc/openssl-1.1.1b |
||||
cp -vfr doc/* /usr/share/doc/openssl-1.1.1b |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf openssl-1.1.1b |
||||
|
||||
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash |
||||
|
||||
#### python |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf Python-3.7.2.tar.xz |
||||
|
||||
cd Python-3.7.2 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--enable-shared \ |
||||
--with-system-expat \ |
||||
--with-system-ffi \ |
||||
--with-ensurepip=yes |
||||
|
||||
make |
||||
|
||||
make install |
||||
chmod -v 755 /usr/lib/libpython3.7m.so |
||||
chmod -v 755 /usr/lib/libpython3.so |
||||
ln -sfv pip3.7 /usr/bin/pip3 |
||||
|
||||
install -v -dm755 /usr/share/doc/python-3.7.2/html |
||||
|
||||
tar --strip-components=1 \ |
||||
--no-same-owner \ |
||||
--no-same-permissions \ |
||||
-C /usr/share/doc/python-3.7.2/html \ |
||||
-xvf ../python-3.7.2-docs-html.tar.bz2 |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf Python-3.7.2 |
||||
|
||||
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash |
||||
|
||||
#### ninja |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf ninja-1.9.0.tar.gz |
||||
|
||||
cd ninja-1.9.0 |
||||
|
||||
python3 configure.py --bootstrap |
||||
python3 configure.py |
||||
|
||||
./ninja ninja_test |
||||
./ninja_test --gtest_filter=-SubprocessTest.SetWithLots |
||||
|
||||
install -vm755 ninja /usr/bin/ |
||||
install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja |
||||
install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf ninja-1.9.0 |
||||
|
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
#### meson |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf meson-0.50.0.tar.gz |
||||
|
||||
cd meson-0.50.0 |
||||
|
||||
python3 setup.py build |
||||
|
||||
python3 setup.py install --root=dest |
||||
cp -rv dest/* / |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf meson-0.50.0 |
||||
|
||||
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash |
||||
|
||||
#### coreutils |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf coreutils-8.31.tar.xz |
||||
|
||||
cd coreutils-8.31 |
||||
|
||||
patch -Np1 -i ../coreutils-8.31-i18n-1.patch |
||||
|
||||
autoreconf -f -i |
||||
|
||||
sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk |
||||
|
||||
FORCE_UNSAFE_CONFIGURE=1 ./configure \ |
||||
--prefix=/usr \ |
||||
--enable-no-install-program=kill,uptime |
||||
|
||||
FORCE_UNSAFE_CONFIGURE=1 make |
||||
|
||||
make install |
||||
|
||||
mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin |
||||
mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin |
||||
mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin |
||||
mv -v /usr/bin/chroot /usr/sbin |
||||
mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 |
||||
|
||||
sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8 |
||||
|
||||
mv -v /usr/bin/{head,nice,sleep,touch} /bin |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf coreutils-8.31 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### check |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf check-0.12.0.tar.gz |
||||
|
||||
cd check-0.12.0 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf check-0.12.0 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### diffutils |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf diffutils-3.7.tar.xz |
||||
|
||||
cd diffutils-3.7 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf diffutils-3.7 |
||||
|
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash |
||||
|
||||
#### gawk |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf gawk-4.2.1.tar.xz |
||||
|
||||
cd gawk-4.2.1 |
||||
|
||||
sed -i 's/extras//' Makefile.in |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
mkdir -pv /usr/share/doc/gawk-4.2.1 |
||||
cp -fv doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-4.2.1 |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf gawk-4.2.1 |
||||
|
||||
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash |
||||
|
||||
#### findutils |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf findutils-4.6.0.tar.gz |
||||
|
||||
cd findutils-4.6.0 |
||||
|
||||
sed -i 's/test-lock..EXEEXT.//' tests/Makefile.in |
||||
|
||||
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c |
||||
sed -i '/unistd/a #include <sys/sysmacros.h>' gl/lib/mountlist.c |
||||
echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h |
||||
|
||||
./configure --prefix=/usr --localstatedir=/var/lib/locate |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
mv -v /usr/bin/find /bin |
||||
sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf findutils-4.6.0 |
||||
|
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
#### groff |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf groff-1.22.4.tar.gz |
||||
|
||||
cd groff-1.22.4 |
||||
|
||||
PAGE=A4 ./configure --prefix=/usr |
||||
|
||||
make -j1 |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf groff-1.22.4 |
||||
|
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash |
||||
|
||||
#### grub |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf grub-2.02.tar.xz |
||||
|
||||
cd grub-2.02 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--sbindir=/sbin \ |
||||
--sysconfdir=/etc \ |
||||
--disable-efiemu \ |
||||
--disable-werror |
||||
|
||||
make |
||||
make install |
||||
|
||||
mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf grub-2.02 |
||||
|
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
#### less |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf less-530.tar.gz |
||||
|
||||
cd less-530 |
||||
|
||||
./configure --prefix=/usr --sysconfdir=/etc |
||||
|
||||
make |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf less-530 |
||||
|
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash |
||||
|
||||
#### gzip |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf gzip-1.10.tar.xz |
||||
|
||||
cd gzip-1.10 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
mv -fv /usr/bin/gzip /bin |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf gzip-1.10 |
||||
|
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash |
||||
|
||||
#### iproute2 |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf iproute2-4.20.0.tar.xz |
||||
|
||||
cd iproute2-4.20.0 |
||||
|
||||
sed -i /ARPD/d Makefile |
||||
rm -fv man/man8/arpd.8 |
||||
|
||||
sed -i 's/.m_ipt.o//' tc/Makefile |
||||
|
||||
make |
||||
make DOCDIR=/usr/share/doc/iproute2-4.20.0 install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf iproute2-4.20.0 |
||||
|
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash |
||||
|
||||
#### kbd |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf kbd-2.0.4.tar.xz |
||||
|
||||
cd kbd-2.0.4 |
||||
|
||||
patch -Np1 -i ../kbd-2.0.4-backspace-1.patch |
||||
|
||||
sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure |
||||
sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in |
||||
|
||||
PKG_CONFIG_PATH=/tools/lib/pkgconfig ./configure --prefix=/usr --disable-vlock |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
mkdir -pv /usr/share/doc/kbd-2.0.4 |
||||
cp -R -fv docs/doc/* /usr/share/doc/kbd-2.0.4 |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf kbd-2.0.4 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### libpipeline |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf libpipeline-1.5.1.tar.gz |
||||
|
||||
cd libpipeline-1.5.1 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf libpipeline-1.5.1 |
||||
|
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash |
||||
|
||||
#### make |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf make-4.2.1.tar.bz2 |
||||
|
||||
cd make-4.2.1 |
||||
|
||||
sed -i '211,217 d; 219,229 d; 232 d' glob/glob.c |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make PERL5LIB=$PWD/tests/ check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf make-4.2.1 |
||||
|
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash |
||||
|
||||
#### patch |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf patch-2.7.6.tar.xz |
||||
|
||||
cd patch-2.7.6 |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf patch-2.7.6 |
||||
|
||||
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash |
||||
|
||||
#### man-db |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf man-db-2.8.5.tar.xz |
||||
|
||||
cd man-db-2.8.5 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--docdir=/usr/share/doc/man-db-2.8.5 \ |
||||
--sysconfdir=/etc \ |
||||
--disable-setuid \ |
||||
--enable-cache-owner=bin \ |
||||
--with-browser=/usr/bin/lynx \ |
||||
--with-vgrind=/usr/bin/vgrind \ |
||||
--with-grap=/usr/bin/grap \ |
||||
--with-systemdtmpfilesdir= \ |
||||
--with-systemdsystemunitdir= |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
|
||||
rm -rfv /lib/systemd |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf man-db-2.8.5 |
||||
|
||||
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash |
||||
|
||||
#### tar |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf tar-1.32.tar.xz |
||||
|
||||
cd tar-1.32 |
||||
|
||||
FORCE_UNSAFE_CONFIGURE=1 \ |
||||
./configure --prefix=/usr \ |
||||
--bindir=/bin |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
make -C doc install-html docdir=/usr/share/doc/tar-1.32 |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf tar-1.32 |
||||
|
||||
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash |
||||
|
||||
#### texinfo |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf texinfo-6.6.tar.xz |
||||
|
||||
cd texinfo-6.6 |
||||
|
||||
./configure --prefix=/usr --disable-static |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
make TEXMF=/usr/share/texmf install-tex |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf texinfo-6.6 |
||||
|
||||
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash |
||||
|
||||
#### vim |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf vim-8.1.tar.bz2 |
||||
|
||||
cd vim81 |
||||
|
||||
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h |
||||
|
||||
./configure --prefix=/usr |
||||
|
||||
make |
||||
LANG=en_US.UTF-8 make -j1 test &> vim-test.log |
||||
make install |
||||
|
||||
ln -sfv vim /usr/bin/vi |
||||
|
||||
for L in /usr/share/man/{,*/}man1/vim.1; do |
||||
ln -sfv vim.1 "$(dirname $L)/vi.1" |
||||
done |
||||
|
||||
ln -sfv ../vim/vim81/doc /usr/share/doc/vim-8.1 |
||||
|
||||
cat > /etc/vimrc <<-"EOF" |
||||
source $VIMRUNTIME/defaults.vim |
||||
|
||||
let skip_defaults_vim=1 |
||||
|
||||
set nocompatible |
||||
set backspace=2 |
||||
set number |
||||
set mouse= |
||||
|
||||
syntax on |
||||
|
||||
if (&term == "xterm") || (&term == "putty") |
||||
set background=dark |
||||
endif |
||||
EOF |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf vim81 |
||||
|
||||
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash |
||||
|
||||
#### procps-ng |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf procps-ng-3.3.15.tar.xz |
||||
|
||||
cd procps-ng-3.3.15 |
||||
|
||||
./configure --prefix=/usr \ |
||||
--exec-prefix= \ |
||||
--libdir=/usr/lib \ |
||||
--docdir=/usr/share/doc/procps-ng-3.3.15 \ |
||||
--disable-static \ |
||||
--disable-kill |
||||
|
||||
make |
||||
|
||||
sed -i -r 's|(pmap_initname)\\\$|\1|' testsuite/pmap.test/pmap.exp |
||||
sed -i '/set tty/d' testsuite/pkill.test/pkill.exp |
||||
|
||||
rm testsuite/pgrep.test/pgrep.exp |
||||
|
||||
make check |
||||
|
||||
make install |
||||
|
||||
mv -fv /usr/lib/libprocps.so.* /lib |
||||
ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf procps-ng-3.3.15 |
||||
|
||||
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash |
||||
|
||||
#### util-linux |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf util-linux-2.33.1.tar.xz |
||||
|
||||
cd util-linux-2.33.1 |
||||
|
||||
mkdir -pv /var/lib/hwclock |
||||
|
||||
rm -vf /usr/include/{blkid,libmount,uuid} |
||||
|
||||
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ |
||||
--docdir=/usr/share/doc/util-linux-2.33.1 \ |
||||
--disable-chfn-chsh \ |
||||
--disable-login \ |
||||
--disable-nologin \ |
||||
--disable-su \ |
||||
--disable-setpriv \ |
||||
--disable-runuser \ |
||||
--disable-pylibmount \ |
||||
--disable-static \ |
||||
--without-python \ |
||||
--without-systemd \ |
||||
--without-systemdsystemunitdir |
||||
|
||||
make |
||||
|
||||
chown -Rv nobody . |
||||
su nobody -s /bin/bash -c "PATH=$PATH make -k check" |
||||
|
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf util-linux-2.33.1 |
||||
|
||||
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash |
||||
|
||||
#### e2fsprogs |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf e2fsprogs-1.45.0.tar.gz |
||||
|
||||
cd e2fsprogs-1.45.0 |
||||
|
||||
mkdir -v build; cd build |
||||
|
||||
../configure --prefix=/usr \ |
||||
--bindir=/bin \ |
||||
--with-root-prefix="" \ |
||||
--enable-elf-shlibs \ |
||||
--disable-libblkid \ |
||||
--disable-libuuid \ |
||||
--disable-uuidd \ |
||||
--disable-fsck |
||||
|
||||
make |
||||
make check |
||||
make install |
||||
make install-libs |
||||
|
||||
chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a |
||||
|
||||
gunzip -v /usr/share/info/libext2fs.info.gz |
||||
install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info |
||||
|
||||
makeinfo -o doc/com_err.info ../lib/et/com_err.texinfo |
||||
install -v -m644 doc/com_err.info /usr/share/info |
||||
install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf e2fsprogs-1.45.0 |
||||
|
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash |
||||
|
||||
#### sysklogd |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf sysklogd-1.5.1.tar.gz |
||||
|
||||
cd sysklogd-1.5.1 |
||||
|
||||
sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c |
||||
sed -i 's/union wait/int/' syslogd.c |
||||
|
||||
make |
||||
make BINDIR=/sbin install |
||||
|
||||
cat > /etc/syslog.conf <<-"EOF" |
||||
# Begin /etc/syslog.conf |
||||
|
||||
auth,authpriv.* -/var/log/auth.log |
||||
*.*;auth,authpriv.none -/var/log/sys.log |
||||
daemon.* -/var/log/daemon.log |
||||
kern.* -/var/log/kern.log |
||||
mail.* -/var/log/mail.log |
||||
user.* -/var/log/user.log |
||||
*.emerg * |
||||
|
||||
# End /etc/syslog.conf |
||||
EOF |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf sysklogd-1.5.1 |
||||
|
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
#### sysvinit |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf sysvinit-2.94.tar.xz |
||||
|
||||
cd sysvinit-2.94 |
||||
|
||||
patch -Np1 -i ../sysvinit-2.94-consolidated-4.patch |
||||
|
||||
make |
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf sysvinit-2.94 |
||||
|
||||
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash |
||||
|
||||
#### eudev |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf eudev-3.2.7.tar.gz |
||||
|
||||
cd eudev-3.2.7 |
||||
|
||||
sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl |
||||
sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c |
||||
|
||||
cat > config.cache <<-"EOF" |
||||
HAVE_BLKID=1 |
||||
BLKID_LIBS="-lblkid" |
||||
BLKID_CFLAGS="-I/tools/include" |
||||
EOF |
||||
|
||||
./configure --prefix=/usr \ |
||||
--bindir=/sbin \ |
||||
--sbindir=/sbin \ |
||||
--libdir=/usr/lib \ |
||||
--sysconfdir=/etc \ |
||||
--libexecdir=/lib \ |
||||
--with-rootprefix= \ |
||||
--with-rootlibdir=/lib \ |
||||
--enable-manpages \ |
||||
--disable-static \ |
||||
--config-cache |
||||
|
||||
LIBRARY_PATH=/tools/lib make |
||||
|
||||
mkdir -pv /lib/udev/rules.d |
||||
mkdir -pv /etc/udev/rules.d |
||||
|
||||
make LD_LIBRARY_PATH=/tools/lib check |
||||
make LD_LIBRARY_PATH=/tools/lib install |
||||
|
||||
tar -xvf ../udev-lfs-20171102.tar.bz2 |
||||
|
||||
make -f udev-lfs-20171102/Makefile.lfs install |
||||
|
||||
LD_LIBRARY_PATH=/tools/lib udevadm hwdb --update |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf eudev-3.2.7 |
||||
|
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash |
||||
|
||||
#### lfs-bootscripts |
||||
|
||||
cd /sources |
||||
|
||||
tar -xf lfs-bootscripts-20180820.tar.bz2 |
||||
|
||||
cd lfs-bootscripts-20180820 |
||||
|
||||
make install |
||||
|
||||
cd /sources |
||||
|
||||
rm -rf lfs-bootscripts-20180820 |
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue