mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Rename cargo to rustpkg and start over fresh
This commit is contained in:
parent
3e97cce27d
commit
621c791ded
12
Makefile.in
12
Makefile.in
@ -131,7 +131,7 @@ CFG_STDLIB :=$(call CFG_LIB_NAME,std)
|
||||
CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc)
|
||||
CFG_LIBSYNTAX :=$(call CFG_LIB_NAME,syntax)
|
||||
CFG_LIBFUZZER :=$(call CFG_LIB_NAME,fuzzer)
|
||||
CFG_LIBCARGO :=$(call CFG_LIB_NAME,cargo)
|
||||
CFG_LIBRUSTPKG :=$(call CFG_LIB_NAME,rustpkg)
|
||||
CFG_LIBRUSTDOC :=$(call CFG_LIB_NAME,rustdoc)
|
||||
CFG_LIBRUSTI :=$(call CFG_LIB_NAME,rusti)
|
||||
|
||||
@ -140,7 +140,7 @@ CORELIB_GLOB :=$(call CFG_LIB_GLOB,core)
|
||||
LIBRUSTC_GLOB :=$(call CFG_LIB_GLOB,rustc)
|
||||
LIBSYNTAX_GLOB :=$(call CFG_LIB_GLOB,syntax)
|
||||
LIBFUZZER_GLOB :=$(call CFG_LIB_GLOB,fuzzer)
|
||||
LIBCARGO_GLOB :=$(call CFG_LIB_GLOB,cargo)
|
||||
LIBRUSTPKG_GLOB :=$(call CFG_LIB_GLOB,rustpkg)
|
||||
LIBRUSTDOC_GLOB :=$(call CFG_LIB_GLOB,rustdoc)
|
||||
LIBRUSTI_GLOB :=$(call CFG_LIB_GLOB,rusti)
|
||||
STDLIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,std)
|
||||
@ -148,7 +148,7 @@ CORELIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,core)
|
||||
LIBRUSTC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustc)
|
||||
LIBSYNTAX_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,syntax)
|
||||
LIBFUZZER_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,fuzzer)
|
||||
LIBCARGO_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,cargo)
|
||||
LIBRUSTPKG_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustpkg)
|
||||
LIBRUSTDOC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustdoc)
|
||||
LIBRUSTI_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rusti)
|
||||
|
||||
@ -371,11 +371,11 @@ SREQ$(1)_T_$(2)_H_$(3) = \
|
||||
CSREQ$(1)_T_$(2)_H_$(3) = \
|
||||
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
|
||||
$$(HBIN$(1)_H_$(3))/fuzzer$$(X) \
|
||||
$$(HBIN$(1)_H_$(3))/cargo$$(X) \
|
||||
$$(HBIN$(1)_H_$(3))/rustpkg$$(X) \
|
||||
$$(HBIN$(1)_H_$(3))/rustdoc$$(X) \
|
||||
$$(HBIN$(1)_H_$(3))/rusti$$(X) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBCARGO) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTPKG) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
|
||||
@ -383,7 +383,7 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCARGO) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTPKG) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI)
|
||||
|
||||
|
@ -56,7 +56,7 @@ for more information on them.
|
||||
|
||||
When complete, `make install` will place several programs into
|
||||
`/usr/local/bin`: `rustc`, the Rust compiler; `rustdoc`, the
|
||||
API-documentation tool, and `cargo`, the Rust package manager.
|
||||
API-documentation tool, and `rustpkg`, the Rust package manager and build system.
|
||||
|
||||
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
|
||||
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
|
||||
|
12
mk/clean.mk
12
mk/clean.mk
@ -64,12 +64,12 @@ define CLEAN_HOST_STAGE_N
|
||||
clean$(1)_H_$(2):
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustc$(X)
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/fuzzer$(X)
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/cargo$(X)
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustpkg$(X)
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/serializer$(X)
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustdoc$(X)
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rusti$(X)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBFUZZER)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBCARGO)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTPKG)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUNTIME)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_CORELIB)
|
||||
@ -82,7 +82,7 @@ clean$(1)_H_$(2):
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTC_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBSYNTAX_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBFUZZER_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBCARGO_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTPKG_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOC_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTI_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUSTLLVM)
|
||||
@ -99,11 +99,11 @@ define CLEAN_TARGET_STAGE_N
|
||||
clean$(1)_T_$(2)_H_$(3):
|
||||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustc$(X)
|
||||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/fuzzer$(X)
|
||||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/cargo$(X)
|
||||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustpkg$(X)
|
||||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/serializer$(X)
|
||||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustdoc$(X)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBCARGO)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB)
|
||||
@ -115,7 +115,7 @@ clean$(1)_T_$(2)_H_$(3):
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTC_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBFUZZER_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBCARGO_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTPKG_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOC_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib
|
||||
|
@ -25,7 +25,7 @@ PKG_FILES := \
|
||||
$(addprefix $(S)src/, \
|
||||
README.txt \
|
||||
driver \
|
||||
libcargo \
|
||||
librustpkg \
|
||||
librusti \
|
||||
librustc \
|
||||
compiletest \
|
||||
|
@ -55,7 +55,7 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
|
||||
$$(Q)$$(call INSTALL_LIB, \
|
||||
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBSYNTAX_GLOB))
|
||||
$$(Q)$$(call INSTALL_LIB, \
|
||||
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBCARGO_GLOB))
|
||||
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTPKG_GLOB))
|
||||
$$(Q)$$(call INSTALL_LIB, \
|
||||
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTDOC_GLOB))
|
||||
$$(Q)$$(call INSTALL_LIB, \
|
||||
@ -87,11 +87,11 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
|
||||
$(Q)mkdir -p $(PREFIX_LIB)
|
||||
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1
|
||||
$(Q)$(call INSTALL,$(HB2),$(PHB),rustc$(X))
|
||||
$(Q)$(call INSTALL,$(HB2),$(PHB),cargo$(X))
|
||||
$(Q)$(call INSTALL,$(HB2),$(PHB),rustpkg$(X))
|
||||
$(Q)$(call INSTALL,$(HB2),$(PHB),rustdoc$(X))
|
||||
$(Q)$(call INSTALL,$(HB2),$(PHB),rusti$(X))
|
||||
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTC))
|
||||
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBCARGO))
|
||||
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTPKG))
|
||||
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTDOC))
|
||||
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTI))
|
||||
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB))
|
||||
@ -112,11 +112,11 @@ HOST_LIB_FROM_HL_GLOB = \
|
||||
|
||||
uninstall:
|
||||
$(Q)rm -f $(PHB)/rustc$(X)
|
||||
$(Q)rm -f $(PHB)/cargo$(X)
|
||||
$(Q)rm -f $(PHB)/rustpkg$(X)
|
||||
$(Q)rm -f $(PHB)/rusti$(X)
|
||||
$(Q)rm -f $(PHB)/rustdoc$(X)
|
||||
$(Q)rm -f $(PHL)/$(CFG_RUSTLLVM)
|
||||
$(Q)rm -f $(PHL)/$(CFG_LIBCARGO)
|
||||
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTPKG)
|
||||
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTC)
|
||||
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTDOC)
|
||||
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTI)
|
||||
@ -126,7 +126,7 @@ uninstall:
|
||||
$(call HOST_LIB_FROM_HL_GLOB,$(STDLIB_GLOB)) \
|
||||
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTC_GLOB)) \
|
||||
$(call HOST_LIB_FROM_HL_GLOB,$(LIBSYNTAX_GLOB)) \
|
||||
$(call HOST_LIB_FROM_HL_GLOB,$(LIBCARGO_GLOB)) \
|
||||
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTPKG_GLOB)) \
|
||||
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTDOC_GLOB)) \
|
||||
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTI_GLOB)) \
|
||||
; \
|
||||
|
2
mk/pp.mk
2
mk/pp.mk
@ -18,7 +18,7 @@ else
|
||||
$(wildcard $(S)src/test/*/*.rs \
|
||||
$(S)src/test/*/*/*.rs) \
|
||||
$(wildcard $(S)src/fuzzer/*.rs) \
|
||||
$(wildcard $(S)src/cargo/*.rs) \
|
||||
$(wildcard $(S)src/rustpkg/*.rs) \
|
||||
$(wildcard $(S)src/rusti/*.rs)
|
||||
|
||||
PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L \
|
||||
|
@ -14,7 +14,7 @@
|
||||
######################################################################
|
||||
|
||||
# The names of crates that must be tested
|
||||
TEST_CRATES = core std syntax rustc rustdoc rusti cargo
|
||||
TEST_CRATES = core std syntax rustc rustdoc rusti rustpkg
|
||||
|
||||
# Markdown files under doc/ that should have their code extracted and run
|
||||
DOC_TEST_NAMES = tutorial tutorial-ffi tutorial-macros tutorial-borrowed-ptr tutorial-tasks rust
|
||||
@ -229,8 +229,8 @@ $(3)/test/rustctest.stage$(1)-$(2)$$(X): \
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
|
||||
|
||||
$(3)/test/cargotest.stage$(1)-$(2)$$(X): \
|
||||
$$(CARGO_LIB) $$(CARGO_INPUTS) \
|
||||
$(3)/test/rustpkgtest.stage$(1)-$(2)$$(X): \
|
||||
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
|
||||
|
32
mk/tools.mk
32
mk/tools.mk
@ -14,13 +14,13 @@
|
||||
FUZZER_LIB := $(S)src/libfuzzer/fuzzer.rc
|
||||
FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/libfuzzer/, *.rs))
|
||||
|
||||
# The test runner that runs the cfail/rfail/rpass and bench tests
|
||||
# The test runner that runs the cfail/rfail/rpass and bxench tests
|
||||
COMPILETEST_CRATE := $(S)src/compiletest/compiletest.rc
|
||||
COMPILETEST_INPUTS := $(wildcard $(S)src/compiletest/*rs)
|
||||
|
||||
# Cargo, the package manager
|
||||
CARGO_LIB := $(S)src/libcargo/cargo.rc
|
||||
CARGO_INPUTS := $(wildcard $(S)src/libcargo/*rs)
|
||||
# Rustpkg, the package manager and build system
|
||||
RUSTPKG_LIB := $(S)src/librustpkg/rustpkg.rc
|
||||
RUSTPKG_INPUTS := $(wildcard $(S)src/librustpkg/*rs)
|
||||
|
||||
# Rustdoc, the documentation tool
|
||||
RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rc
|
||||
@ -57,8 +57,8 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X): \
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$<
|
||||
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO): \
|
||||
$$(CARGO_LIB) $$(CARGO_INPUTS) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG): \
|
||||
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
|
||||
@ -66,11 +66,11 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO): \
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X): \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG)
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg cargo -o $$@ $$<
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustpkg -o $$@ $$<
|
||||
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC): \
|
||||
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
|
||||
@ -134,19 +134,19 @@ $$(HBIN$(2)_H_$(4))/compiletest$$(X): \
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBCARGO): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTPKG): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBCARGO_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBCARGO_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTPKG_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTPKG_DSYM_GLOB)) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HBIN$(2)_H_$(4))/cargo$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBCARGO) \
|
||||
$$(HBIN$(2)_H_$(4))/rustpkg$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTPKG) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
@ -29,7 +29,7 @@ test/auxiliary - Dependencies of tests
|
||||
|
||||
compiletest/ The test runner
|
||||
|
||||
libcargo/ The package manager
|
||||
librustpkg/ The package manager and build system
|
||||
|
||||
librusti/ The JIT REPL
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
#[no_core];
|
||||
extern mod core(vers = "0.6");
|
||||
|
||||
#[cfg(cargo)]
|
||||
extern mod this(name = "cargo", vers = "0.6");
|
||||
#[cfg(rustpkg)]
|
||||
extern mod this(name = "rustpkg", vers = "0.6");
|
||||
|
||||
#[cfg(fuzzer)]
|
||||
extern mod this(name = "fuzzer", vers = "0.6");
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,115 +0,0 @@
|
||||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use core::os;
|
||||
use core::path::Path;
|
||||
use core::run;
|
||||
|
||||
pub fn gpgv(args: ~[~str]) -> run::ProgramOutput {
|
||||
return run::program_output(~"gpgv", args);
|
||||
}
|
||||
|
||||
pub fn signing_key() -> ~str {
|
||||
~"
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.0
|
||||
|
||||
mQINBE7dQY0BEADYs5pHqXQugXjmgRTj0AzE3F4HAEJAiUBechVOmCgNcnW4dyb6bgj7Ctqs
|
||||
Td/ZDSZkFwmsIqpwfGxMr+s9VA3PW+sEMDZPY+p8w3kvFPo/L2eRjSnQ+cPffdUPo+IXl96d
|
||||
N/49iXs6/d7PHw+pYszdgCfpPAAo4TtLJLVCWRs1ETSbZBIUOFywgE5P71egYVMgYKndRM5K
|
||||
cY0ZUsGUX9InpItuD3R7vFwDL9cUHBonOJoax+rYeM7eLQvNncl4YAwJsUKOVDBy28QK2wmz
|
||||
R6MsBTX8+vRkj3ZTCnP1+RBNllViYnq6absnAgHFdQ6OL4T2wKhAaYhukE1foFTNNI1wAm4s
|
||||
iYAI20Me+54xMQZa3QvrokL/Wf9+qeajEDOTZWs1T3Sn+H3Dg3T25b8WOH3ULZE7R4FPr0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sZ8HfOVAXZTY61
|
||||
LM0v11eI6w0lCUC6GqWfzpph+uxUQjJ6YrGomj7nDrvj8Dp4S4UYaJc+1pcVPjO/XmZrZkb1
|
||||
6KnTm4RJcIW0iO61g7SDn8JZCmrDf9Ur+9NmRdynEeiWn9DUkbAXTKj09NiRyV+8mVmSGw4F
|
||||
Jylqtk+X4WTu7qCm9C0S3ROuSSJOkCQGcE552GaS5RN9wdL/cG1PfqQjSaY0HMQzpBzV+nXa
|
||||
2eFk3Bg2/qi4OghjR00Y3SQftDWI4K3opwVdsF7u9YH6PQoX4jl5DJIvtdIwwQJVaHLjVF4r
|
||||
koV3ryFlL4Oq70TLwBSUlUhYoii5pokr3GdzloUWuuBa8AK5sM0RG/pybUPWK1PQnDlJJg6H
|
||||
JyEC4EFfBWv2+nwt1K+vIRuCX9ZSd5YP9F4RbQjsnz7dimo5ooy3Wj7Fv7lQnQGkaUev0+hs
|
||||
t9H7RfQEyREukTMxzXjKEW9EO4lJ20cif3l7Be+bw6OzKaEkVE3reZRnKxO6SejUYA7reye1
|
||||
HI1jilzwKSXuV2EmyBk3tKh9NwscT/A78pr30FxxPUg3v72raNgusTo=
|
||||
=2z6P
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
"
|
||||
}
|
||||
|
||||
pub fn signing_key_fp() -> ~str {
|
||||
~"FE79 EDB0 3DEF B0D8 27D2 6C41 0B2D 6A28 3033 6376"
|
||||
}
|
||||
|
||||
pub fn supported() -> bool {
|
||||
let r = gpgv(~[~"--version"]);
|
||||
r.status == 0
|
||||
}
|
||||
|
||||
pub fn init(root: &Path) {
|
||||
let p = root.push("gpg");
|
||||
if !os::path_is_dir(&p) {
|
||||
os::make_dir(&p, 0x1c0i32);
|
||||
let mut p = run::start_program(~"gpg", ~[~"--homedir",
|
||||
p.to_str(),
|
||||
~"--import"]);
|
||||
p.input().write_str(signing_key());
|
||||
let s = p.finish();
|
||||
if s != 0 {
|
||||
fail!(~"pgp init failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add(root: &Path, key: &Path) {
|
||||
let path = root.push("gpg");
|
||||
let p =
|
||||
run::program_output(~"gpg", ~[~"--homedir", path.to_str(),
|
||||
~"--import", key.to_str()]);
|
||||
if p.status != 0 {
|
||||
fail!(~"pgp add failed: " + p.out);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn verify(root: &Path, data: &Path, sig: &Path) -> bool {
|
||||
let path = root.push("gpg");
|
||||
let res = gpgv(~[~"--homedir", path.to_str(),
|
||||
~"--keyring", ~"pubring.gpg",
|
||||
~"--verbose",
|
||||
sig.to_str(), data.to_str()]);
|
||||
if res.status != 0 {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"central": {
|
||||
"url": "https://raw.github.com/mozilla/cargo-central/master/packages.json"
|
||||
},
|
||||
"elly": {
|
||||
"url": "https://raw.github.com/elly/rust-packages/master/packages.json",
|
||||
"sig": "https://raw.github.com/elly/rust-packages/master/packages.json.sig",
|
||||
"key": "https://raw.github.com/elly/rust-packages/master/signing-key.gpg",
|
||||
"keyfp": "4107 21C0 FF32 858F 61FF 33F6 E595 8E36 FDC8 EA00"
|
||||
},
|
||||
"erickt": {
|
||||
"url": "https://raw.github.com/erickt/rust-packages/master/packages.json"
|
||||
}
|
||||
}
|
@ -49,11 +49,11 @@ pub fn mk_filesearch(maybe_sysroot: Option<Path>,
|
||||
paths.push(
|
||||
make_target_lib_path(&self.sysroot,
|
||||
self.target_triple));
|
||||
match get_cargo_lib_path_nearest() {
|
||||
match get_rustpkg_lib_path_nearest() {
|
||||
result::Ok(ref p) => paths.push((/*bad*/copy *p)),
|
||||
result::Err(_) => ()
|
||||
}
|
||||
match get_cargo_lib_path() {
|
||||
match get_rustpkg_lib_path() {
|
||||
result::Ok(ref p) => paths.push((/*bad*/copy *p)),
|
||||
result::Err(_) => ()
|
||||
}
|
||||
@ -119,54 +119,54 @@ fn get_sysroot(maybe_sysroot: Option<Path>) -> Path {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_cargo_sysroot() -> Result<Path, ~str> {
|
||||
result::Ok(get_or_default_sysroot().push_many([libdir(), ~"cargo"]))
|
||||
pub fn get_rustpkg_sysroot() -> Result<Path, ~str> {
|
||||
result::Ok(get_or_default_sysroot().push_many([libdir(), ~"rustpkg"]))
|
||||
}
|
||||
|
||||
pub fn get_cargo_root() -> Result<Path, ~str> {
|
||||
match os::getenv(~"CARGO_ROOT") {
|
||||
pub fn get_rustpkg_root() -> Result<Path, ~str> {
|
||||
match os::getenv(~"RUSTPKG_ROOT") {
|
||||
Some(ref _p) => result::Ok(Path((*_p))),
|
||||
None => match os::homedir() {
|
||||
Some(ref _q) => result::Ok((*_q).push(".cargo")),
|
||||
None => result::Err(~"no CARGO_ROOT or home directory")
|
||||
Some(ref _q) => result::Ok((*_q).push(".rustpkg")),
|
||||
None => result::Err(~"no RUSTPKG_ROOT or home directory")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_cargo_root_nearest() -> Result<Path, ~str> {
|
||||
do result::chain(get_cargo_root()) |p| {
|
||||
pub fn get_rustpkg_root_nearest() -> Result<Path, ~str> {
|
||||
do result::chain(get_rustpkg_root()) |p| {
|
||||
let cwd = os::getcwd();
|
||||
let cwd_cargo = cwd.push(".cargo");
|
||||
let cargo_is_non_root_file =
|
||||
!os::path_is_dir(&cwd_cargo) && cwd_cargo != p;
|
||||
let mut par_cargo = cwd.pop().push(".cargo");
|
||||
let mut rslt = result::Ok(cwd_cargo);
|
||||
let cwd_rustpkg = cwd.push(".rustpkg");
|
||||
let rustpkg_is_non_root_file =
|
||||
!os::path_is_dir(&cwd_rustpkg) && cwd_rustpkg != p;
|
||||
let mut par_rustpkg = cwd.pop().push(".rustpkg");
|
||||
let mut rslt = result::Ok(cwd_rustpkg);
|
||||
|
||||
if cargo_is_non_root_file {
|
||||
while par_cargo != p {
|
||||
if os::path_is_dir(&par_cargo) {
|
||||
rslt = result::Ok(par_cargo);
|
||||
if rustpkg_is_non_root_file {
|
||||
while par_rustpkg != p {
|
||||
if os::path_is_dir(&par_rustpkg) {
|
||||
rslt = result::Ok(par_rustpkg);
|
||||
break;
|
||||
}
|
||||
if par_cargo.components.len() == 1 {
|
||||
// We just checked /.cargo, stop now.
|
||||
if par_rustpkg.components.len() == 1 {
|
||||
// We just checked /.rustpkg, stop now.
|
||||
break;
|
||||
}
|
||||
par_cargo = par_cargo.pop().pop().push(".cargo");
|
||||
par_rustpkg = par_rustpkg.pop().pop().push(".rustpkg");
|
||||
}
|
||||
}
|
||||
rslt
|
||||
}
|
||||
}
|
||||
|
||||
fn get_cargo_lib_path() -> Result<Path, ~str> {
|
||||
do result::chain(get_cargo_root()) |p| {
|
||||
fn get_rustpkg_lib_path() -> Result<Path, ~str> {
|
||||
do result::chain(get_rustpkg_root()) |p| {
|
||||
result::Ok(p.push(libdir()))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_cargo_lib_path_nearest() -> Result<Path, ~str> {
|
||||
do result::chain(get_cargo_root_nearest()) |p| {
|
||||
fn get_rustpkg_lib_path_nearest() -> Result<Path, ~str> {
|
||||
do result::chain(get_rustpkg_root_nearest()) |p| {
|
||||
result::Ok(p.push(libdir()))
|
||||
}
|
||||
}
|
||||
|
31
src/librustpkg/rustpkg.rc
Normal file
31
src/librustpkg/rustpkg.rc
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// rustpkg - a purely function package manager and build system
|
||||
|
||||
#[link(name = "rustpkg",
|
||||
vers = "0.6",
|
||||
uuid = "25de5e6e-279e-4a20-845c-4cabae92daaf",
|
||||
url = "https://github.com/mozilla/rust/tree/master/src/librustpkg")];
|
||||
|
||||
#[crate_type = "lib"];
|
||||
|
||||
#[no_core];
|
||||
|
||||
extern mod core(vers = "0.6");
|
||||
extern mod std(vers = "0.6");
|
||||
extern mod rustc(vers = "0.6");
|
||||
extern mod syntax(vers = "0.6");
|
||||
|
||||
use rustc::metadata::{filesearch};
|
||||
|
||||
pub fn main() {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user